diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-11-30 17:26:40 +0000 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-11-30 17:26:40 +0000 |
commit | d492dd657c85f3d71389f0968e300a045b151dcc (patch) | |
tree | c8b62a6641212a09d4789bf99e7c003f3a866d2b /src/corelib | |
parent | 27706c69c45c3431abf28e3b2a8c1e308f58fca9 (diff) | |
download | fpGUI-d492dd657c85f3d71389f0968e300a045b151dcc.tar.xz |
Minor optimisation for UTF8Insert()
Length() is a more 'lite" version than UTF8Length(), and in that code we don't need the
functionality of the latter.
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/fpg_stringutils.pas | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/fpg_stringutils.pas b/src/corelib/fpg_stringutils.pas index f24c9106..900ecd2a 100644 --- a/src/corelib/fpg_stringutils.pas +++ b/src/corelib/fpg_stringutils.pas @@ -329,7 +329,7 @@ var b: string; e: string; begin - if UTF8Length(SubStr) = 0 then + if Length(SubStr) = 0 then Exit; //==> b := UTF8Copy(AText, 1, Index-1); // beginning string e := UTF8Copy(AText, Index, UTF8Length(AText)-Index+1); // ending string |