Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KItinerary
Commits
c19c1052
Commit
c19c1052
authored
Aug 28, 2021
by
Volker Krause
Browse files
Port StringUtil::normalizer to QStringView
parent
68a51203
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/lib/stringutil.cpp
View file @
c19c1052
...
...
@@ -27,7 +27,7 @@ QChar StringUtil::normalize(QChar c)
return
n
;
}
QString
StringUtil
::
normalize
(
const
QString
&
str
)
QString
StringUtil
::
normalize
(
QString
View
str
)
{
QString
out
;
out
.
reserve
(
str
.
size
());
...
...
src/lib/stringutil.h
View file @
c19c1052
...
...
@@ -23,7 +23,7 @@ namespace StringUtil
/** Strips out diacritics and converts to case-folded form.
* @internal only exported for unit tests
*/
KITINERARY_EXPORT
QString
normalize
(
const
QString
&
str
);
KITINERARY_EXPORT
QString
normalize
(
QString
View
str
);
/** Assuming both sides are describing the same thing, this tries to find the "better" string.
* That is, prefer the one that didn't lose casing/unicode/etc in previous processing.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment