summaryrefslogtreecommitdiff
path: root/gfx/fputf8utils.pas
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/fputf8utils.pas')
-rw-r--r--gfx/fputf8utils.pas6
1 files changed, 6 insertions, 0 deletions
diff --git a/gfx/fputf8utils.pas b/gfx/fputf8utils.pas
index 0bad5380..f04c4212 100644
--- a/gfx/fputf8utils.pas
+++ b/gfx/fputf8utils.pas
@@ -16,6 +16,7 @@ uses
function UTF8Pos(const SearchForText, SearchInText: string): integer;
function UTF8Copy(const s: string; StartCharIndex, CharCount: integer): string;
+function UTF8Length(const s: string): integer;
function UTF8Length(p: PChar; ByteCount: integer): integer;
function UTF8CharStart(UTF8Str: PChar; Len, Index: integer): PChar;
function UTF8CharacterLength(p: PChar): integer;
@@ -55,6 +56,11 @@ begin
end;
end;
+function UTF8Length(const s: string): integer;
+begin
+ Result := UTF8Length(PChar(s),length(s));
+end;
+
function UTF8Length(p: PChar; ByteCount: integer): integer;
var
CharLen: LongInt;