diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-07-23 18:09:11 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-07-23 18:09:11 +0000 |
commit | 21c1082f916cc9a4d7be625c132e02b1fc1d8012 (patch) | |
tree | cf3c705058db9839ba80cebfaf0fe69086fa38f2 /unicode/src/base/UUnicodeUtils.pas | |
parent | 446eec893b7915d80a4504d40bbfc6f77cafa550 (diff) | |
download | usdx-21c1082f916cc9a4d7be625c132e02b1fc1d8012.tar.gz usdx-21c1082f916cc9a4d7be625c132e02b1fc1d8012.tar.xz usdx-21c1082f916cc9a4d7be625c132e02b1fc1d8012.zip |
- 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
Diffstat (limited to 'unicode/src/base/UUnicodeUtils.pas')
-rw-r--r-- | unicode/src/base/UUnicodeUtils.pas | 10 |
1 files changed, 10 insertions, 0 deletions
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 @@ -149,6 +149,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). *} function UTF8Copy(const str: UTF8String; Index: Integer = 1; Count: Integer = -1): UTF8String; @@ -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)); |