package
9.0.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev
# Functions
BuildStringFromLabels construct config labels into string by following format: "keyA=valueA,keyB=valueB".
CompileLike2Regexp convert a like `lhs` to a regular expression.
CompilePattern is an adapter for `CompilePatternInner`, `pattern` can be any unicode string.
CompilePatternBinary is used for binary strings.
CompilePatternInner handles escapes and wild cards convert pattern characters and pattern types.
CompilePatternInnerBinary handles escapes and wild cards convert pattern characters and pattern types in bytes.
ConvertPosInUtf8 converts a binary index to the position which shows the occurrence location in the utf8 string Take "你好" as example:
binary index for "好" is 3, ConvertPosInUtf8("你好", 3) should return 2.
Copy deep copies a string.
DoMatch is an adapter for `DoMatchCustomized`, `str` can be any unicode string.
DoMatchBinary is an adapter for `DoMatchInner`, `str` is binary strings or ascii string.
DoMatchCustomized is an adapter for `DoMatchInner`, `str` can be any unicode string.
Escape the identifier for pretty-printing.
EscapeGlobQuestionMark escapes '?' for a glob path pattern.
GetTailSpaceCount returns the number of tailed spaces.
IsExactMatch return true if no wildcard character.
IsLowerASCII judges if this is lower alphabet.
IsNumericASCII judges if a byte is numeric.
IsUpperASCII judges if this is capital alphabet.
LowerOneString lowers the ascii characters in a string.
LowerOneStringExcludeEscapeChar lowers strings and exclude an escape char
When escape_char is a capital char, we shouldn't lower the escape char.
MemoizeStr returns memoized version of stringFunc.
TrimUtf8String needs the string input should always be valid which means that it should always return true in utf8.ValidString(str).
Unquote interprets s as a single-quoted, double-quoted, or backquoted Go string literal, returning the string value that s quotes.
UnquoteChar decodes the first character or byte in the escaped string or character literal represented by the string s.
Utf8Len calculates how many bytes the utf8 character takes.
# Variables
ErrSyntax indicates that a value does not have the right syntax for the target type.
# Type aliases
StringerFunc defines string func implement fmt.Stringer.
StringerStr defines a alias to normal string.