146 |
return str; |
return str; |
147 |
} |
} |
148 |
|
|
149 |
|
|
150 |
|
vector<string> str_split(string input) |
151 |
|
{ |
152 |
|
string buf; |
153 |
|
stringstream ss(input); |
154 |
|
vector<string> tokens; |
155 |
|
while (ss >> buf) |
156 |
|
tokens.push_back(buf); |
157 |
|
return tokens; |
158 |
|
} |
159 |
|
|
160 |
|
|
161 |
vector<string> str_split(string input, string delimiter) |
vector<string> str_split(string input, string delimiter) |
162 |
{ |
{ |
163 |
vector<string> retval; |
vector<string> retval; |
180 |
return retval; |
return retval; |
181 |
} |
} |
182 |
|
|
183 |
char my_toupper(char ch) |
char danish_map[3][2] = { {198,230}, {216,248}, {197,229} }; // aelig, oslash, aring |
184 |
|
|
185 |
|
unsigned char my_toupper(unsigned char ch) |
186 |
{ |
{ |
187 |
if (ch == 'æ') |
if (ch == 230) |
188 |
return 'Æ'; |
return 198; |
189 |
if (ch == 'ø') |
if (ch == 248) |
190 |
return 'Ø'; |
return 216; |
191 |
if (ch == 'å') |
if (ch == 229) |
192 |
return 'Å'; |
return 197; |
193 |
|
|
194 |
return ::toupper(ch); |
return ::toupper(ch); |
195 |
} |
} |
196 |
|
|
197 |
char my_tolower(char ch) |
unsigned char my_tolower(unsigned char ch) |
198 |
{ |
{ |
199 |
if (ch == 'Æ') |
if (ch == 198) |
200 |
return 'æ'; |
return 230; |
201 |
if (ch == 'Ø') |
if (ch == 216) |
202 |
return 'ø'; |
return 248; |
203 |
if (ch == 'Å') |
if (ch == 197) |
204 |
return 'å'; |
return 229; |
205 |
|
|
206 |
return ::tolower(ch); |
return ::tolower(ch); |
207 |
} |
} |