comparison src/core/strings.cc @ 102:b315f3759c56

*: big patch 1. use a wrapper for mINI that enables case sensitivity (personal preference) 2. rename dark_theme.cc to theme.cc and change it to be a class 3. include the "dep" folder so we don't have stupidity in json.h or ini.h 4. I think the graph was also tweaked a lot in this, nothing is constexpr and size is found at runtime...
author Paper <mrpapersonic@gmail.com>
date Fri, 03 Nov 2023 21:32:52 -0400
parents c537996cf67b
children ab191e28e69d
comparison
equal deleted inserted replaced
101:c537996cf67b 102:b315f3759c56
10 #include <cctype> 10 #include <cctype>
11 #include <codecvt> 11 #include <codecvt>
12 #include <locale> 12 #include <locale>
13 #include <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 #include <unordered_map>
15 16
16 namespace Strings { 17 namespace Strings {
17 18
18 /* ew */ 19 /* ew */
19 std::string Implode(const std::vector<std::string>& vector, const std::string& delimiter) { 20 std::string Implode(const std::vector<std::string>& vector, const std::string& delimiter) {
143 tmp = def; 144 tmp = def;
144 } 145 }
145 return tmp; 146 return tmp;
146 } 147 }
147 148
149 bool BeginningMatchesSubstring(const std::string& str, const std::string& sub) {
150 for (unsigned long long i = 0; i < str.length() && i < sub.length(); i++)
151 if (str[i] != sub[i])
152 return false;
153 return true;
154 }
155
148 } // namespace Strings 156 } // namespace Strings