aboutsummaryrefslogtreecommitdiffstats
path: root/unicode
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-07-23 15:08:36 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-07-23 15:08:36 +0000
commita5ab9db03dffa30f29e309d222f14fd57e308479 (patch)
treeaa61da383f63bda1a506eab957a6ea4f1587bd21 /unicode
parent34c3fa9fec4f5d23a67ba4ef9dfdec28bf043bf8 (diff)
downloadusdx-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 'unicode')
-rw-r--r--unicode/src/menu/UMenuText.pas10
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;