diff include/core/strings.h @ 264:9a04802848c0

*: improve multiple things e.g. making some strings.cc functions modify strings in-place, improving m4_ax_have_qt.m4 code, making anime_db.cc rely on std::optional rather than std::shared_ptr (which was stupid anyway)
author Paper <paper@paper.us.eu.org>
date Thu, 11 Apr 2024 10:15:57 -0400
parents 3ec7804abf17
children f31305b9f60a
line wrap: on
line diff
--- a/include/core/strings.h	Wed Apr 03 20:46:40 2024 -0400
+++ b/include/core/strings.h	Thu Apr 11 10:15:57 2024 -0400
@@ -25,6 +25,8 @@
 void SanitizeLineEndings(std::string& string);
 void RemoveHtmlTags(std::string& string);
 void ParseHtmlEntities(std::string& string);
+void NormalizeUnicode(std::string& string);
+void NormalizeAnimeTitle(std::string& string);
 
 /* stupid HTML bullshit */
 void TextifySynopsis(std::string& string);
@@ -66,8 +68,8 @@
 
 uint64_t HumanReadableSizeToBytes(const std::string& str);
 
-std::string RemoveLeadingChars(std::string s, const char c);
-std::string RemoveTrailingChars(std::string s, const char c);
+void RemoveLeadingChars(std::string& s,  const char c);
+void RemoveTrailingChars(std::string& s, const char c);
 
 bool BeginningMatchesSubstring(const std::string& str, const std::string& sub);