package truncate

import "github.com/oslokommune/okctl/pkg/truncate"

Package truncate implements truncating variables

Index

Functions

func Bytes

func Bytes(b []byte, maxLength int) []byte

Bytes truncates a byte array to the minimum of its length and the given max length

func String

func String(s string, maxLength int) string

String truncates a string to the minimum of its length and the given max length

Source Files

truncate.go

Version
v0.0.106 (latest)
Published
Oct 21, 2022
Platform
linux/amd64
Imports
1 packages
Last checked
18 hours ago

Tools for package owners.