diff src/core/strings.cc @ 221:53211cb1e7f5

library: add initial library stuff nice
author Paper <paper@paper.us.eu.org>
date Mon, 08 Jan 2024 13:21:08 -0500
parents 7cf53145de11
children f784b5b1914c 2f5a9247e501
line wrap: on
line diff
--- a/src/core/strings.cc	Mon Jan 08 11:56:09 2024 -0500
+++ b/src/core/strings.cc	Mon Jan 08 13:21:08 2024 -0500
@@ -24,7 +24,7 @@
 	if (vector.size() < 1)
 		return "-";
 
-	std::string out = "";
+	std::string out;
 
 	for (unsigned long long i = 0; i < vector.size(); i++) {
 		out.append(vector.at(i));
@@ -49,7 +49,8 @@
 }
 
 /* This function is really only used for cleaning up the synopsis of
-   horrible HTML debris from AniList :) */
+ * horrible HTML debris from AniList :)
+*/
 std::string ReplaceAll(std::string string, const std::string& find, const std::string& replace) {
 	size_t pos = 0;
 	while ((pos = string.find(find, pos)) != std::string::npos) {
@@ -90,7 +91,10 @@
 std::string ParseHtmlEntities(std::string string) {
 	const std::unordered_map<std::string, std::string> map = {
 		/* The only one of these I can understand using are the first
-		   three. why do the rest of these exist? */
+		 * three. why do the rest of these exist?
+		 *
+		 * probably mojibake.
+		*/
 		{"&lt;", "<"},
 		{"&rt;", ">"},
 		{"&nbsp;", "\xA0"},
@@ -117,7 +121,8 @@
 }
 
 /* let Qt handle the heavy lifting of locale shit
-   I don't want to deal with */
+ * I don't want to deal with
+*/
 std::string ToUpper(const std::string& string) {
 	return ToUtf8String(session.config.locale.GetLocale().toUpper(ToQString(string)));
 }