mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 09:09:30 +02:00
* Added CharInSet, Fixes #14599, since issurrogate* already is in unit Character.
git-svn-id: trunk@20131 -
This commit is contained in:
parent
f136e44b6b
commit
77197cdc39
@ -105,4 +105,9 @@ function BytesOf(const Val: AnsiChar): TBytes;
|
||||
begin
|
||||
SetLength(Result,1);
|
||||
Result[0]:=Byte(Val);
|
||||
end;
|
||||
end;
|
||||
|
||||
Function CharInSet(Ch:AnsiChar;Const CSet : TSysCharSet) : Boolean;
|
||||
begin
|
||||
result:=ch in CSet;
|
||||
end;
|
||||
|
@ -28,4 +28,6 @@ function AnsiStrScan(Str : PChar;Chr: Char) : PChar;
|
||||
function HashName(Name: PAnsiChar): LongWord;
|
||||
|
||||
function BytesOf(const Val: RawByteString): TBytes;
|
||||
function BytesOf(const Val: AnsiChar): TBytes;
|
||||
function BytesOf(const Val: AnsiChar): TBytes;
|
||||
|
||||
Function CharInSet(Ch: AnsiChar;Const CSet : TSysCharSet) : Boolean;
|
||||
|
@ -182,3 +182,7 @@ begin
|
||||
StrLCopy := Dest;
|
||||
end;
|
||||
|
||||
Function CharInSet(Ch:WideChar;Const CSet : TSysCharSet) : Boolean;
|
||||
begin
|
||||
result:=(Ch<=#$FF) and (ansichar(ch) in CSet);
|
||||
end;
|
||||
|
@ -40,4 +40,4 @@ function StrLen(p: pwidechar): sizeint; external name 'FPC_PWIDECHAR_LENGTH'; ov
|
||||
|
||||
function StrCopy(Dest, Source: PWideChar): PWideChar; overload;
|
||||
function StrLCopy(Dest,Source: PWideChar; MaxLen: SizeInt): PWideChar; overload;
|
||||
|
||||
Function CharInSet(Ch:WideChar;Const CSet : TSysCharSet) : Boolean;
|
||||
|
Loading…
Reference in New Issue
Block a user