# Functions
After returns the substring after the first occurrence of a specified string in the source string.
AfterLast returns the substring after the last occurrence of a specified string in the source string.
Before returns the substring of the source string up to the first occurrence of the specified string.
BeforeLast returns the substring of the source string up to the last occurrence of the specified string.
BytesToString converts a byte slice to string without a memory allocation.
CamelCase coverts string to camelCase string.
Capitalize converts the first character of a string to upper case and the remaining to lower case.
Concat uses the strings.Builder to concatenate the input strings.
ContainsAll return true if target string contains all the substrs.
ContainsAny return true if target string contains any one of the substrs.
Ellipsis truncates a string to a specified length and appends an ellipsis.
HammingDistance calculates the Hamming distance between two strings.
HasPrefixAny check if a string starts with any of a slice of specified strings.
HasSuffixAny check if a string ends with any of a slice of specified strings.
HideString hide some chars in source string with param `replaceChar`.
IndexOffset returns the index of the first instance of substr in string after offsetting the string by `idxFrom`, or -1 if substr is not present in string.
IsBlank checks if a string is whitespace, empty.
IsNotBlank checks if a string is not whitespace, not empty.
IsString check if the value data type is string or not.
KebabCase coverts string to kebab-case, non letters and numbers will be ignored.
LowerFirst converts the first character of string to lower case.
Pad pads string on the left and right side if it's shorter than size.
PadEnd pads string on the right side if it's shorter than size.
PadStart pads string on the left side if it's shorter than size.
RegexMatchAllGroups Matches all subgroups in a string using a regular expression and returns the result.
RemoveNonPrintable remove non-printable characters from a string.
RemoveWhiteSpace remove whitespace characters from a string.
ReplaceWithMap returns a copy of `str`, which is replaced by a map in unordered way, case-sensitively.
Reverse returns string whose char order is reversed to the given string.
Rotate rotates the string by the specified number of characters.
Shuffle the order of characters of given string.
SnakeCase coverts string to snake_case, non letters and numbers will be ignored Play: https://go.dev/play/p/tgzQG11qBuN.
SplitAndTrim splits string `str` by a string `delimiter` to a slice, and calls Trim to every element of this slice.
SplitEx split a given string which can control the result slice contains empty string or not.
SplitWords splits a string into words, word only contains alphabetic characters.
StringToBytes converts a string to byte slice without a memory allocation.
SubInBetween return substring between the start and end position(excluded) of source string.
Substring returns a substring of the specified length starting at the specified offset position.
TemplateReplace replaces the placeholders in the template string with the corresponding values in the data map.
Trim strips whitespace (or other characters) from the beginning and end of a string.
Unwrap a given string from anther string.
UpperFirst converts the first character of string to upper case.
UpperKebabCase coverts string to upper KEBAB-CASE, non letters and numbers will be ignored Play: https://go.dev/play/p/zDyKNneyQXk.
UpperSnakeCase coverts string to upper SNAKE_CASE, non letters and numbers will be ignored Play: https://go.dev/play/p/4COPHpnLx38.
WordCount return the number of meaningful word, word only contains alphabetic characters.
Wrap a string with given string.
# Variables
DefaultTrimChars are the characters which are stripped by Trim* functions in default.