aboutsummaryrefslogtreecommitdiffstats
path: root/util/string/escape.cpp
diff options
context:
space:
mode:
authoreeight <eeight@yandex-team.ru>2022-02-10 16:46:18 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:18 +0300
commit475c0a46f28166e83fd263badc7546377cddcabe (patch)
tree39c5a49b8aaad78fe390b6f1f2886bdbda40f3e7 /util/string/escape.cpp
parenta6e0145a095c7bb3770d6e07aee301de5c73f96e (diff)
downloadydb-475c0a46f28166e83fd263badc7546377cddcabe.tar.gz
Restoring authorship annotation for <eeight@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/string/escape.cpp')
-rw-r--r--util/string/escape.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/util/string/escape.cpp b/util/string/escape.cpp
index cd09a7dbd0..ea35b5fb15 100644
--- a/util/string/escape.cpp
+++ b/util/string/escape.cpp
@@ -283,12 +283,12 @@ static TStr& DoUnescapeC(const TChar* p, size_t sz, TStr& res) {
}
case 'U':
- if (CountHex<8>(p + 1, pe) != 8) {
+ if (CountHex<8>(p + 1, pe) != 8) {
res.append(*p);
- } else {
+ } else {
AppendUnicode(res, IntFromString<ui32, 16>(p + 1, 8));
- p += 8;
- }
+ p += 8;
+ }
break;
case 'x':
if (ui32 v = CountHex<2>(p + 1, pe)) {
@@ -319,8 +319,8 @@ static TStr& DoUnescapeC(const TChar* p, size_t sz, TStr& res) {
++p;
} else {
- const auto r = std::basic_string_view<TChar>(p, pe - p).find('\\');
- const auto n = r != std::string::npos ? p + r : pe;
+ const auto r = std::basic_string_view<TChar>(p, pe - p).find('\\');
+ const auto n = r != std::string::npos ? p + r : pe;
res.append(p, n);
p = n;
@@ -338,17 +338,17 @@ TBasicString<TChar>& UnescapeCImpl(const TChar* p, size_t sz, TBasicString<TChar
template <class TChar>
TChar* UnescapeC(const TChar* str, size_t len, TChar* buf) {
struct TUnboundedString {
- void append(TChar ch) noexcept {
+ void append(TChar ch) noexcept {
*P++ = ch;
}
- void append(const TChar* b, const TChar* e) noexcept {
+ void append(const TChar* b, const TChar* e) noexcept {
while (b != e) {
append(*b++);
}
}
- void AppendNoAlias(const TChar* s, size_t l) noexcept {
+ void AppendNoAlias(const TChar* s, size_t l) noexcept {
append(s, s + l);
}