summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2019-12-18 20:23:11 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2019-12-20 11:13:22 +0100
commita2ddd96ac8b7657c2ef64f2a8f51db5cd8a8d96a (patch)
treed118809cc7b6203f9e48c717313dd472cb5d7518 /src/plugins
parent556712f511a02ff8101e648d2e6f0090231d4f3d (diff)
Introduce QString(View)::isValidUtf16
QString(View)s can be built or manipulated in ways that make them contain/refer to improperly encoded UTF-16 data. Problem is, we don't have public APIs to check whether a string contains valid UTF-16. This knowledge is precious if the string is to be fed in algorithms, regular expressions, etc. that expect validated input (e.g. QRegularExpression can be faster if it can assume valid UTF-16, otherwise it has to employ extra checks). Add a function that does the validation. [ChangeLog][QtCore][QStringView] Added QStringView::isValidUtf16. [ChangeLog][QtCore][QString] Added QString::isValidUtf16. Change-Id: Idd699183f6ec08013046c76c6a5a7c524b6c6fbc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/plugins')
0 files changed, 0 insertions, 0 deletions