summaryrefslogtreecommitdiff
path: root/comphelper/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-02-22 12:59:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-03-08 07:06:13 +0100
commit7840effb1d5efd1fd7f6798c7c504b05292a7793 (patch)
tree845e03d4c2cfad1d5bbcaaf9dc3ec1aeece7c864 /comphelper/source
parentbf35f2b36fc00f9b37397422b2ee425c6a697540 (diff)
use more string_view
found by tweaking the stringview loplugin Change-Id: I92203ba99642bef7951ffa146184c5562cb31d09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper/source')
-rw-r--r--comphelper/source/misc/string.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx
index e17951fc43be..1b9137e473c0 100644
--- a/comphelper/source/misc/string.cxx
+++ b/comphelper/source/misc/string.cxx
@@ -525,11 +525,11 @@ OUString reverseString(std::u16string_view rStr)
return sBuf.makeStringAndClear();
}
-OUString reverseCodePoints(OUString const & str) {
- auto const len = str.getLength();
+OUString reverseCodePoints(std::u16string_view str) {
+ auto const len = str.size();
OUStringBuffer buf(len);
- for (auto i = len; i != 0;) {
- buf.appendUtf32(str.iterateCodePoints(&i, -1));
+ for (sal_Int32 i = len; i != 0;) {
+ buf.appendUtf32(o3tl::iterateCodePoints(str, &i, -1));
}
return buf.makeStringAndClear();
}