Positioning
Function ansilastchar (const S: string): pchar; returns the last character of the ANSI string, supporting multi-byte characters
Function ansistrlastchar (P: pchar): pchar; returns the last character (not including null) of an ANSI string ending with an empty string. Among the multi-byte characters, it may not be equal to the last byte
Function bytetocharindex (const S: string; index: integer): integer; returns the character location containing the specified byte of the index.
Function chartobyteindex (const S: string; index: integer): integer; returns the byte location of the specified character in index.
Function nextcharindex (const S: string; index: integer): integer; returns the starting byte location of the next character specified by index.
Function strnextchar (const STR: pchar): pchar; returns the next character of the specified string
Count
Function bytetocharlen (const S: string; maxlen: integer): integer; returns the number of characters that contain the specified number of maxlen bytes.
Function charlength (const S: string; index: integer): integer; returns the byte length of the string.
Function chartobytelen (const S: string; maxlen: integer): integer; returns the byte length of the string specified by maxlen.
Function strcharlength (const STR: pchar): integer; returns the length of the first character in the string.
Conversion
Function ansilowercasefilename (const S: string): string; converts an ANSI string to lowercase
Function ansiuppercasefilename (const S: string): string; converts an ANSI string to uppercase.
Judgment
Function ansicomparefilename (const S1, S2: string): integer; compares the names of two ANSI characters, which are case insensitive.
Function bytetype (const S: string; index: integer): tmbcsbytetype; returns whether the specified byte of the index is a single byte or the first or second byte of the double byte.
Function samefilename (const S1, S2: string): Boolean; judge whether the file name is the same
Function strbytetype (STR: pchar; index: Cardinal): tmbcsbytetype; determines whether the specified index byte is a single byte or the first or second byte