* unicode version of isleadchar. utf8 still to follow, see

git-svn-id: trunk@41085 -
This commit is contained in:
marco 2019-01-27 14:52:52 +00:00
parent c99972bc43
commit 0da16e7dbe
2 changed files with 9 additions and 0 deletions
rtl/objpas/sysutils

View File

@ -11,6 +11,11 @@
*********************************************************************
}
function IsLeadChar(Ch: WideChar): Boolean;
begin
Result := (Ch >= #$D800) and (Ch <= #$DFFF);
end;
function Trim(const S: widestring): widestring;
var
Ofs, Len: sizeint;
@ -180,6 +185,7 @@ begin
result:=(Ch<=#$FF) and (ansichar(byte(ch)) in CSet);
end;
{$macro on}
{$define INWIDESTRINGREPLACE}
{$define SRString:=WideString}

View File

@ -35,3 +35,6 @@ function StrCopy(Dest, Source: PWideChar): PWideChar; overload;
function StrLCopy(Dest,Source: PWideChar; MaxLen: SizeInt): PWideChar; overload;
Function CharInSet(Ch:WideChar;Const CSet : TSysCharSet) : Boolean;
function WideStringReplace(const S, OldPattern, NewPattern: WideString; Flags: TReplaceFlags): WideString;
function IsLeadChar(Ch: WideChar): Boolean; inline; overload;