We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// TruncateBytes truncate []byte to specific length func TruncateBytes(content []byte, length int) []byte { if len(content) > length { return content[:length] } return content } // TruncateBytesToString ... func TruncateBytesToString(content []byte, length int) string { s := TruncateBytes(content, length) return string(s) }
The text was updated successfully, but these errors were encountered:
RepeatN(s string, n int) string use strings.Builder
RepeatN(s string, n int) string
RepeatChar(c rune, n int) string use strings.Builder
RepeatChar(c rune, n int) string
IsNumeric(s string) bool use unicode.IsDigit(v)
IsNumeric(s string) bool
IsAlphanumeric(s string) bool use isAlphanumeric(v)
IsAlphanumeric(s string) bool
IsAlpha(s string) bool use unicode.IsLetter(v)
IsAlpha(s string) bool
ContainsAnySubstrings(s string, subs []string) bool use strings.Contains
ContainsAnySubstrings(s string, subs []string) bool
padLeft / padRight to fixed length with specific char
Sorry, something went wrong.
SplitIntoInt64s(s string) ([]int64, error) JoinInt64s(l []int64) string
1,2,3,4
[]int{1,2,3,4}
[]string{"a", "b"}
a,b
No branches or pull requests
The text was updated successfully, but these errors were encountered: