diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-07-23 15:08:36 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-07-23 15:08:36 +0000 |
commit | a5ab9db03dffa30f29e309d222f14fd57e308479 (patch) | |
tree | aa61da383f63bda1a506eab957a6ea4f1587bd21 | |
parent | 34c3fa9fec4f5d23a67ba4ef9dfdec28bf043bf8 (diff) | |
download | usdx-a5ab9db03dffa30f29e309d222f14fd57e308479.tar.gz usdx-a5ab9db03dffa30f29e309d222f14fd57e308479.tar.xz usdx-a5ab9db03dffa30f29e309d222f14fd57e308479.zip |
DeleteLastLetter uses the more convenient UTF8Copy() now
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1867 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | unicode/src/menu/UMenuText.pas | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/unicode/src/menu/UMenuText.pas b/unicode/src/menu/UMenuText.pas index d3bd213e..276f961b 100644 --- a/unicode/src/menu/UMenuText.pas +++ b/unicode/src/menu/UMenuText.pas @@ -246,16 +246,8 @@ begin end; procedure TText.DeleteLastLetter; -var - Str: UCS4String; - Len: integer; begin - Str := UTF8ToUCS4String(TextString); - Len := Length(Str); - if (Len > 0) then - SetLength(Str, Len-1); - - SetText(UCS4ToUTF8String(Str)); + SetText(UTF8Copy(TextString, 1, LengthUTF8(TextString)-1)); end; procedure TText.Draw; |