package
6.7.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 a adapter for `CompilePatternInner`, `pattern` can be any unicode string.
CompilePatternBytes is a adapter for `CompilePatternInner`, `pattern` can only be an ascii string.
CompilePatternInner handles escapes and wild cards convert pattern characters and pattern types.
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 a adapter for `DoMatchInner`, `str` can be any unicode string.
DoMatchBytes is a adapter for `DoMatchInner`, `str` can only be an ascii string.
DoMatchInner matches the string with patChars and patTypes.
Escape the identifier for pretty-printing.
GetTailSpaceCount returns the number of tailed spaces.
IsExactMatch return true if no wildcard character.
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.

# Constants

PatAny is the enumeration value for '%' match.
PatMatch is the enumeration value for per-character match.
PatOne is the enumeration value for '_' match.

# 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.