Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteSlice2String ¶
ByteSlice2String converts a byte slice into a string without a heap allocation. Be aware that the byte slice and the string share the same memory - which makes the string mutable.
func FieldsN ¶
FieldsN splits the string s around each instance of one or more consecutive space characters, filling f with substrings of s. If s contains more fields than n, the last element of f is set to the unparsed remainder of s starting with the first non-space character. f will stay untouched if s is empty or contains only white space. if n is greater than len(f), 0 is returned without doing any parsing.
Apart from the mentioned differences, FieldsN is like an allocation-free strings.Fields.
func SplitN ¶
SplitN splits the string around each instance of sep, filling f with substrings of s. If s contains more fields than n, the last element of f is set to the unparsed remainder of s starting with the first non-space character. f will stay untouched if s is empty or contains only white space. if n is greater than len(f), 0 is returned without doing any parsing.
Apart from the mentioned differences, SplitN is like an allocation-free strings.SplitN.
Types ¶
This section is empty.