Mercurial > minori
diff include/core/strings.h @ 98:582b2fca1561
strings: parse HTML entities when reading synopsis, make the
toupper and tolower functions more sane
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Thu, 02 Nov 2023 15:22:02 -0400 |
parents | c69230dc2b5d |
children | f5940a575d83 |
line wrap: on
line diff
--- a/include/core/strings.h Thu Nov 02 13:14:15 2023 -0400 +++ b/include/core/strings.h Thu Nov 02 15:22:02 2023 -0400 @@ -13,9 +13,10 @@ std::string Implode(const std::vector<std::string>& vector, const std::string& delimiter); /* Substring removal functions */ -std::string ReplaceAll(const std::string& string, const std::string& find, const std::string& replace); +std::string ReplaceAll(std::string string, const std::string& find, const std::string& replace); std::string SanitizeLineEndings(const std::string& string); std::string RemoveHtmlTags(const std::string& string); +std::string ParseHtmlEntities(const std::string& string); /* stupid HTML bullshit */ std::string TextifySynopsis(const std::string& string); @@ -23,6 +24,8 @@ std::string ToUpper(const std::string& string); std::string ToLower(const std::string& string); +/* functions that make the way we convert from and to + different string formats universal */ std::wstring ToWstring(const std::string& string); std::wstring ToWstring(const QString& string); std::string ToUtf8String(const std::wstring& wstring);