mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-21 20:09:40 +02:00
* unicode version of isleadchar. utf8 still to follow, see #34754
git-svn-id: trunk@41085 -
This commit is contained in:
parent
c99972bc43
commit
0da16e7dbe
@ -11,6 +11,11 @@
|
|||||||
*********************************************************************
|
*********************************************************************
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function IsLeadChar(Ch: WideChar): Boolean;
|
||||||
|
begin
|
||||||
|
Result := (Ch >= #$D800) and (Ch <= #$DFFF);
|
||||||
|
end;
|
||||||
|
|
||||||
function Trim(const S: widestring): widestring;
|
function Trim(const S: widestring): widestring;
|
||||||
var
|
var
|
||||||
Ofs, Len: sizeint;
|
Ofs, Len: sizeint;
|
||||||
@ -180,6 +185,7 @@ begin
|
|||||||
result:=(Ch<=#$FF) and (ansichar(byte(ch)) in CSet);
|
result:=(Ch<=#$FF) and (ansichar(byte(ch)) in CSet);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$macro on}
|
{$macro on}
|
||||||
{$define INWIDESTRINGREPLACE}
|
{$define INWIDESTRINGREPLACE}
|
||||||
{$define SRString:=WideString}
|
{$define SRString:=WideString}
|
||||||
|
@ -35,3 +35,6 @@ function StrCopy(Dest, Source: PWideChar): PWideChar; overload;
|
|||||||
function StrLCopy(Dest,Source: PWideChar; MaxLen: SizeInt): PWideChar; overload;
|
function StrLCopy(Dest,Source: PWideChar; MaxLen: SizeInt): PWideChar; overload;
|
||||||
Function CharInSet(Ch:WideChar;Const CSet : TSysCharSet) : Boolean;
|
Function CharInSet(Ch:WideChar;Const CSet : TSysCharSet) : Boolean;
|
||||||
function WideStringReplace(const S, OldPattern, NewPattern: WideString; Flags: TReplaceFlags): WideString;
|
function WideStringReplace(const S, OldPattern, NewPattern: WideString; Flags: TReplaceFlags): WideString;
|
||||||
|
|
||||||
|
function IsLeadChar(Ch: WideChar): Boolean; inline; overload;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user