D8800: Add a new function to measure the length by text.
Xuetian Weng
noreply at phabricator.kde.org
Mon Nov 13 19:13:06 UTC 2017
xuetianweng created this revision.
xuetianweng added reviewers: hein, apol.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.
REVISION SUMMARY
CJK language contains more information per character. When people try to
write code to cap the user input by length, ususally it makes more sense
to loose limit for CJK strings. In real life, twitter now also employs
similar algorithm to make tweet length 280 in latin or 140 in CJK characters.
TEST PLAN
unit test.
REPOSITORY
R244 KCoreAddons
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D8800
AFFECTED FILES
autotests/kstringhandlertest.cpp
autotests/kstringhandlertest.h
src/lib/text/kstringhandler.cpp
src/lib/text/kstringhandler.h
To: xuetianweng, hein, apol
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171113/11a12fe2/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list