merge r14143 from cpstrnew branch by paul:

use RawByteString instead of AnsiString for Pos()

git-svn-id: trunk@19099 -
This commit is contained in:
paul 2011-09-17 11:54:58 +00:00
parent e9f8182370
commit 55434fd1d8
2 changed files with 6 additions and 6 deletions

View File

@ -796,7 +796,7 @@ begin
Pointer(fpc_ansistr_Copy):=ResultAddress;
end;
Function Pos (Const Substr : ShortString; Const Source : AnsiString) : SizeInt;
Function Pos (Const Substr : ShortString; Const Source : RawByteString) : SizeInt;
var
i,MaxLen : SizeInt;
@ -823,7 +823,7 @@ begin
end;
Function Pos (Const Substr : AnsiString; Const Source : AnsiString) : SizeInt;
Function Pos (Const Substr : RawByteString; Const Source : RawByteString) : SizeInt;
var
i,MaxLen : SizeInt;
pc : pchar;
@ -853,7 +853,7 @@ end;
{ pos(c: char; const s: shortstring) also exists, so otherwise }
{ using pos(char,pchar) will always call the shortstring version }
{ (exact match for first argument), also with $h+ (JM) }
Function Pos (c : Char; Const s : AnsiString) : SizeInt;
Function Pos (c : Char; Const s : RawByteString) : SizeInt;
var
i: SizeInt;
pc : pchar;

View File

@ -840,7 +840,7 @@ Procedure Insert(source:Char;var s:shortstring;index:SizeInt);
Function Pos(const substr:shortstring;const s:shortstring):SizeInt;
Function Pos(C:Char;const s:shortstring):SizeInt;
{$ifdef FPC_HAS_FEATURE_ANSISTRINGS}
Function Pos (const Substr : ShortString; const Source : AnsiString) : SizeInt;
Function Pos (const Substr : ShortString; const Source : RawByteString) : SizeInt;
Procedure SetString (out S : AnsiString; Buf : PChar; Len : SizeInt);
Procedure SetString (out S : AnsiString; Buf : PWideChar; Len : SizeInt);
{$endif FPC_HAS_FEATURE_ANSISTRINGS}
@ -873,8 +873,8 @@ function pos(const substr : shortstring;c:char): SizeInt;
{$ifdef FPC_HAS_FEATURE_ANSISTRINGS}
Procedure UniqueString(var S : AnsiString);external name 'FPC_ANSISTR_UNIQUE';
Function Pos (const Substr : AnsiString; const Source : AnsiString) : SizeInt;
Function Pos (c : Char; const s : AnsiString) : SizeInt;
Function Pos (const Substr : RawByteString; const Source : RawByteString) : SizeInt;
Function Pos (c : Char; const s : RawByteString) : SizeInt;
Procedure Insert (const Source : AnsiString; var S : AnsiString; Index : SizeInt);
Procedure Delete (var S : AnsiString; Index,Size: SizeInt);
Function StringOfChar(c : char;l : SizeInt) : AnsiString;