Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2018-01

LazUtils/LazUtf16 - why "widestring"

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

AlexeyT
function UTF16CharacterLength(p: PWideChar): integer;
function UTF16Length(const s: widestring): PtrInt; overload;
function UTF16Length(p: PWideChar; WordCount: PtrInt): PtrInt; overload;
function UTF16Copy(const s: UnicodeString; StartCharIndex, CharCount:
PtrInt): Unicodestring;
function UTF16CharStart(P: PWideChar; Len, CharIndex: PtrInt): PWideChar;
function UTF16Pos(const SearchForText, SearchInText: UnicodeString;
StartPos: PtrInt = 1): PtrInt;
function UTF16CharacterToUnicode(p: PWideChar; out CharLen: integer):
Cardinal;
function UnicodeToUTF16(u: cardinal): widestring;
function IsUTF16CharValid(AChar, ANextChar: WideChar): Boolean;
function IsUTF16StringValid(AWideStr: widestring): Boolean;
function Utf16StringReplace(const S, OldPattern, NewPattern: WideString;
Flags: TReplaceFlags): WideString;

Pls, use UnicodeString type here

Regards, Alexey

Reply by email