summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2010-09-30 22:35:10 +0200
committerGraeme Geldenhuys <graemeg@gmail.com>2010-09-30 22:35:10 +0200
commit112a8ddcc19a4f4f6e51b5ba3212b8779899b95a (patch)
tree41cc2ae00ce8ab27eeb8a7128d2cb3c322e2c1b6 /src
parent4387da1d5c116b3b2b7c0deeb0565d5e2fd3e0d5 (diff)
downloadfpGUI-112a8ddcc19a4f4f6e51b5ba3212b8779899b95a.tar.xz
This patch gives UTF8Insert more descriptive parameter names
Diffstat (limited to 'src')
-rw-r--r--src/corelib/fpg_stringutils.pas12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/fpg_stringutils.pas b/src/corelib/fpg_stringutils.pas
index 54bfd6b8..e4d75f86 100644
--- a/src/corelib/fpg_stringutils.pas
+++ b/src/corelib/fpg_stringutils.pas
@@ -37,7 +37,7 @@ function UTF8Length(const s: string): integer;
function UTF8Length(p: PChar; ByteCount: integer): integer;
function UTF8Pos(const SearchForText, SearchInText: string): integer;
procedure UTF8Delete(var S: string; Index, Size: integer);
-procedure UTF8Insert(const Source: string; var S: string; Index: integer);
+procedure UTF8Insert(const SubStr: string; var AText: string; Index: integer);
function UTF8CharAtByte(const s: string; const BytePos: integer; out aChar: string): integer;
@@ -274,16 +274,16 @@ begin
S := b + e;
end;
-procedure UTF8Insert(const Source: string; var S: string; Index: integer);
+procedure UTF8Insert(const SubStr: string; var AText: string; Index: integer);
var
b: string;
e: string;
begin
- if UTF8Length(Source) = 0 then
+ if UTF8Length(SubStr) = 0 then
Exit; //==>
- b := UTF8Copy(S, 1, Index-1); // beginning string
- e := UTF8Copy(S, Index, UTF8Length(S)-Index+1); // ending string
- S := b + Source + e;
+ b := UTF8Copy(AText, 1, Index-1); // beginning string
+ e := UTF8Copy(AText, Index, UTF8Length(AText)-Index+1); // ending string
+ AText := b + SubStr + e;
end;
function UTF8CharAtByte(const s: string; const BytePos: integer; out aChar: string): integer;