mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-03 15:57:10 +01:00
* implemented stringofchar unicodestring, bug #39483
(cherry picked from commit 4568c77f57)
This commit is contained in:
parent
bcdfa7c926
commit
c214b949d4
@ -22,7 +22,7 @@ Function Pos (c : UnicodeChar; Const s : UnicodeString; Offset: Sizeint = 1) : S
|
||||
Function Pos (const c : RawByteString; Const s : UnicodeString; Offset: Sizeint = 1) : SizeInt;
|
||||
Function Pos (const c : UnicodeString; Const s : RawByteString; Offset: Sizeint = 1) : SizeInt;
|
||||
Function Pos (const c : ShortString; Const s : UnicodeString; Offset: Sizeint = 1) : SizeInt;
|
||||
|
||||
Function StringOfChar(c : Unicodechar;l : SizeInt) : UnicodeString;
|
||||
Function UpCase(const s : UnicodeString) : UnicodeString;
|
||||
Function UpCase(c:UnicodeChar):UnicodeChar;
|
||||
Function LowerCase(const s : UnicodeString) : UnicodeString;
|
||||
|
||||
@ -1234,6 +1234,15 @@ Function Pos (const c : UnicodeString; Const s : RawByteString; Offset: Sizeint
|
||||
result:=Pos(c,UnicodeString(s),OffSet);
|
||||
end;
|
||||
|
||||
{$ifndef FPC_HAS_UNICODESTR_OF_CHAR}
|
||||
{$define FPC_HAS_UNICODESTR_OF_CHAR}
|
||||
Function StringOfChar(c : Unicodechar;l : SizeInt) : UnicodeString;
|
||||
begin
|
||||
SetLength(StringOfChar,l);
|
||||
FillWord(Pointer(StringOfChar)^,Length(StringOfChar),word(c));
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
{$ifndef FPC_HAS_POS_CHAR_UNICODESTR}
|
||||
{$define FPC_HAS_POS_CHAR_UNICODESTR}
|
||||
{ Faster version for a char alone. Must be implemented because }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user