From 21c1082f916cc9a4d7be625c132e02b1fc1d8012 Mon Sep 17 00:00:00 2001 From: tobigun Date: Thu, 23 Jul 2009 18:09:11 +0000 Subject: - IPath integration - BASS is now unicode compatible git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1875 b956fd51-792f-4845-bead-9b4dfca2ff2c --- unicode/src/base/UUnicodeUtils.pas | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'unicode/src/base/UUnicodeUtils.pas') diff --git a/unicode/src/base/UUnicodeUtils.pas b/unicode/src/base/UUnicodeUtils.pas index ce1731b6..29be778a 100644 --- a/unicode/src/base/UUnicodeUtils.pas +++ b/unicode/src/base/UUnicodeUtils.pas @@ -148,6 +148,11 @@ function UCS4UpperCase(const str: UCS4String): UCS4String; overload; *} function UCS4CharToString(ch: UCS4Char): UCS4String; +{** + * @seealso System.Pos() + *} +function UTF8Pos(const substr: UTF8String; const str: UTF8String): Integer; + {** * Copies a segment of str starting with Index (1-based) with Count characters (not bytes). *} @@ -520,6 +525,11 @@ begin Result[1] := 0; end; +function UTF8Pos(const substr: UTF8String; const str: UTF8String): Integer; +begin + Result := Pos(substr, str); +end; + function UTF8Copy(const str: UTF8String; Index: Integer; Count: Integer): UTF8String; begin Result := UCS4ToUTF8String(UCS4Copy(UTF8ToUCS4String(str), Index-1, Count)); -- cgit v1.2.3