bytes.Split() function is used to split a slice of bytes with separator in go. It slices a slice of bytes into all sub-slices by separator.…
Category: bytes
bytes.ReplaceAll() function is used to replace all bytes in slice of bytes in go. It returns the copy of modified slice of bytes. ReplaceAll() function…
bytes.Replace() function is used to replace n bytes in slice of bytes in go. It returns the copy of modified slice of bytes. Replace() function…
bytes.IndexRune() is used to get first index of rune in slice of bytes in go. It returns the byte index of the first occurrence of…
Here, bytes.TrimSuffix() function is used to trim suffix bytes in slice of bytes in go. It trims trailing suffix in slice of bytes. TrimSuffix() built-in…
Here, bytes.TrimPrefix() function is used to trim prefix bytes in slice of bytes in go. It trims leading prefix in slice of bytes. TrimPrefix() built-in…
Here, bytes.Fields() function is used to split byte slice on whitespace in go where white space is defined by unicode.IsSpace. Fields() built-in function of bytes…
Here, bytes.EqualFold() function is used to compare two byte slices case insensitive in go. EqualFold() built-in function of bytes package compare two byte slices which…
Here, bytes.Cut() function is used to cut first matching bytes in slice of bytes in go. Cut() function returns slices of the original slice. Cut()…
Here, bytes.ToTitle() function is used to covert slice of bytes to mapped to their title case which means title case is upper case for ASCII.…