aboutsummaryrefslogtreecommitdiffstats
path: root/util/string
diff options
context:
space:
mode:
authorpg <pg@yandex-team.com>2023-03-28 21:30:10 +0300
committerpg <pg@yandex-team.com>2023-03-28 21:30:10 +0300
commit25659221f18577ea38430a8ec3349836f5626b6a (patch)
tree61f1c68d385eb4bde77c5c12e055eb6f44e1f9ae /util/string
parenta30195c57a0e043158d80a4385350eee326197f1 (diff)
downloadydb-25659221f18577ea38430a8ec3349836f5626b6a.tar.gz
Diffstat (limited to 'util/string')
-rw-r--r--util/string/ascii.h20
-rw-r--r--util/string/join.h2
-rw-r--r--util/string/reverse.h12
3 files changed, 17 insertions, 17 deletions
diff --git a/util/string/ascii.h b/util/string/ascii.h
index d376af153a..94bf920e81 100644
--- a/util/string/ascii.h
+++ b/util/string/ascii.h
@@ -233,21 +233,21 @@ static inline bool AsciiHasPrefix(const TStringBuf s1, const TStringBuf s2) noex
}
/**
- * ASCII case-insensitive string comparison (for proper UTF8 strings
- * case-insensitive comparison consider using @c library/cpp/charset).
- *
- * @return true iff @c s2 are case-insensitively prefix of @c s1.
- */
+ * ASCII case-insensitive string comparison (for proper UTF8 strings
+ * case-insensitive comparison consider using @c library/cpp/charset).
+ *
+ * @return true iff @c s2 are case-insensitively prefix of @c s1.
+ */
static inline bool AsciiHasPrefixIgnoreCase(const TStringBuf s1, const TStringBuf s2) noexcept {
return (s1.size() >= s2.size()) && strnicmp(s1.data(), s2.data(), s2.size()) == 0;
}
/**
- * ASCII case-insensitive string comparison (for proper UTF8 strings
- * case-insensitive comparison consider using @c library/cpp/charset).
- *
- * @return true iff @c s2 are case-insensitively suffix of @c s1.
- */
+ * ASCII case-insensitive string comparison (for proper UTF8 strings
+ * case-insensitive comparison consider using @c library/cpp/charset).
+ *
+ * @return true iff @c s2 are case-insensitively suffix of @c s1.
+ */
static inline bool AsciiHasSuffixIgnoreCase(const TStringBuf s1, const TStringBuf s2) noexcept {
return (s1.size() >= s2.size()) && strnicmp((s1.data() + (s1.size() - s2.size())), s2.data(), s2.size()) == 0;
}
diff --git a/util/string/join.h b/util/string/join.h
index b166fad1f3..e3c08ef584 100644
--- a/util/string/join.h
+++ b/util/string/join.h
@@ -250,7 +250,7 @@ constexpr auto MakeRangeJoiner(TStringBuf delim, const std::initializer_list<TVa
* This way JoinSeq(",", { s1, s2 }) always does the right thing whatever types s1 and s2 have.
*
* If someone needs to join std::initializer_list<TString> -- it still works because of the TContainer template above.
-*/
+ */
template <typename T>
inline std::enable_if_t<
diff --git a/util/string/reverse.h b/util/string/reverse.h
index 80f8b00887..3a70eef061 100644
--- a/util/string/reverse.h
+++ b/util/string/reverse.h
@@ -5,12 +5,12 @@
void ReverseInPlace(TString& string);
/** NB. UTF-16 is variable-length encoding because of the surrogate pairs.
- * This function takes this into account and treats a surrogate pair as a single symbol.
- * Ex. if [C D] is a surrogate pair,
- * A B [C D] E
- * will become
- * E [C D] B A
- */
+ * This function takes this into account and treats a surrogate pair as a single symbol.
+ * Ex. if [C D] is a surrogate pair,
+ * A B [C D] E
+ * will become
+ * E [C D] B A
+ */
void ReverseInPlace(TUtf16String& string);
void ReverseInPlace(TUtf32String& string);