summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/fpg_stringutils.pas9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/corelib/fpg_stringutils.pas b/src/corelib/fpg_stringutils.pas
index 30ddff14..f5e6f817 100644
--- a/src/corelib/fpg_stringutils.pas
+++ b/src/corelib/fpg_stringutils.pas
@@ -23,7 +23,7 @@ unit fpg_stringutils;
interface
uses
- Classes, SysUtils;
+ Classes, SysUtils, fpg_base;
function UTF8CharacterLength(p: PChar): integer;
@@ -45,6 +45,8 @@ function Pos8(const SearchForText, SearchInText: string): integer;
procedure Delete8(var S: string; Index, Size: integer);
procedure Insert8(const Source: string; var S: string; Index: integer);
+function fpgCharAt(const s: TfpgString; Index: integer): TfpgChar;
+
implementation
@@ -310,6 +312,11 @@ begin
UTF8Insert(Source, S, Index);
end;
+function fpgCharAt(const s: TfpgString; Index: integer): TfpgChar;
+begin
+ Result := UTF8Copy(s, Index, 1);
+end;
+
end.