summaryrefslogtreecommitdiff
path: root/zen/utf.h
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2024-05-10 11:21:56 -0400
committerB. Stack <bgstack15@gmail.com>2024-05-10 11:21:56 -0400
commit7a5f22cfe87f938ef58f92b48ac379dc1c4c81c7 (patch)
tree3ed84995318afbd82d5d98a2ba044f9ba58b57c6 /zen/utf.h
parentadd upstream 13.5 (diff)
downloadFreeFileSync-7a5f22cfe87f938ef58f92b48ac379dc1c4c81c7.tar.gz
FreeFileSync-7a5f22cfe87f938ef58f92b48ac379dc1c4c81c7.tar.bz2
FreeFileSync-7a5f22cfe87f938ef58f92b48ac379dc1c4c81c7.zip
add upstream 13.613.6
Diffstat (limited to 'zen/utf.h')
-rw-r--r--zen/utf.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/zen/utf.h b/zen/utf.h
index aad05aba..0872fc8f 100644
--- a/zen/utf.h
+++ b/zen/utf.h
@@ -25,8 +25,8 @@ bool isValidUtf(const UtfString& str); //check for UTF-8 encoding errors
template <class UtfString>
size_t unicodeLength(const UtfString& str); //return number of code points for UTF-encoded string
-template <class UtfString>
-UtfString getUnicodeSubstring(const UtfString& str, size_t uniPosFirst, size_t uniPosLast);
+template <class UtfStringOut, class UtfStringIn>
+UtfStringOut getUnicodeSubstring(const UtfStringIn& str, size_t uniPosFirst, size_t uniPosLast);
@@ -310,14 +310,14 @@ size_t unicodeLength(const UtfString& str) //return number of code points (+ cor
}
-template <class UtfString> inline
-UtfString getUnicodeSubstring(const UtfString& str, size_t uniPosFirst, size_t uniPosLast) //return position of unicode char in UTF-encoded string
+template <class UtfStringOut, class UtfStringIn> inline
+UtfStringOut getUnicodeSubstring(const UtfStringIn& str, size_t uniPosFirst, size_t uniPosLast) //return position of unicode char in UTF-encoded string
{
assert(uniPosFirst <= uniPosLast && uniPosLast <= unicodeLength(str));
using namespace impl;
- using CharType = GetCharTypeT<UtfString>;
+ using CharType = GetCharTypeT<UtfStringIn>;
- UtfString output;
+ UtfStringOut output;
assert(uniPosFirst <= uniPosLast);
if (uniPosFirst >= uniPosLast) //optimize for empty range
return output;
bgstack15