39#ifndef INCLUDE_GUARD_EUNOMIA_UTILITY_H
40#define INCLUDE_GUARD_EUNOMIA_UTILITY_H
63 c = std::tolower((
unsigned char)
c);
95template<
class C,
class T,
class A>
97std::vector<std::basic_string<C, T, A>>
99 const std::basic_string<C, T, A>&
str,
const std::basic_string<C, T, A>&
dlm)
101 std::vector<std::basic_string<C, T, A>>
rvec;
102 typename std::basic_string<C, T, A>::size_type
f = 0;
104 while (
f <
str.size()) {
106 if (
b == std::basic_string<C, T, A>::npos) {
128template<
class C,
class T,
class A>
130std::vector<std::basic_string<C, T, A>>
133 std::vector<std::basic_string<C, T, A>>
rvec;
134 typename std::basic_string<C, T, A>::size_type
f = 0;
136 while (
f <
str.size()) {
138 if (
b == std::basic_string<C, T, A>::npos) {
160template<
class C,
class T,
class A>
162std::vector<std::basic_string<C, T, A>>
165 std::vector<std::basic_string<C, T, A>>
rvec;
166 typename std::basic_string<C, T, A>::size_type
f = 0;
168 while (
f <
str.size()) {
170 if (
b == std::basic_string<C, T, A>::npos) {
193template<
class C,
class T,
class A>
195std::basic_string<C, T, A>
197 const std::basic_string<C, T, A>&
str,
198 const std::basic_string<C, T, A>&
removed)
202 if (
l == std::basic_string<C, T, A>::npos)
203 return std::string(
"");
206 return str.substr(
l,
r -
l + 1);
218template<
class C,
class T,
class A>
220std::basic_string<C, T, A>
225 if (
l == std::basic_string<C, T, A>::npos)
226 return std::string(
"");
229 return str.substr(
l,
r -
l + 1);
241template<
class C,
class T,
class A>
243std::basic_string<C, T, A>
245 const std::basic_string<C, T, A>&
str,
246 const std::basic_string<C, T, A>&
removed)
250 if (
l == std::basic_string<C, T, A>::npos)
251 return std::string(
"");
253 return str.substr(
l,
str.size() -
l);
265template<
class C,
class T,
class A>
267std::basic_string<C, T, A>
272 if (
l == std::basic_string<C, T, A>::npos)
273 return std::string(
"");
275 return str.substr(
l,
str.size() -
l);
287template<
class C,
class T,
class A>
289std::basic_string<C, T, A>
291 const std::basic_string<C, T, A>&
str,
292 const std::basic_string<C, T, A>&
removed)
295 if (
r == std::basic_string<C, T, A>::npos)
296 return std::string(
"");
298 return str.substr(0,
r + 1);
310template<
class C,
class T,
class A>
312std::basic_string<C, T, A>
316 if (
r == std::basic_string<C, T, A>::npos)
317 return std::string(
"");
319 return str.substr(0,
r + 1);
畫像バッファ基底クラステンプレート
Definition imagebuffer.h:84
std::basic_string< C, T, A > trim(const std::basic_string< C, T, A > &str, const std::basic_string< C, T, A > &removed)
文字列の先頭と末尾からの指定文字の除去
Definition utility.h:196
std::vector< std::basic_string< C, T, A > > split(const std::basic_string< C, T, A > &str, const std::basic_string< C, T, A > &dlm)
文字列分割
Definition utility.h:98
std::string lower(const std::string &str)
小文字文字列化
Definition utility.h:59
std::basic_string< C, T, A > rtrim(const std::basic_string< C, T, A > &str, const std::basic_string< C, T, A > &removed)
文字列の末尾からの指定文字の除去
Definition utility.h:290
std::basic_string< C, T, A > ltrim(const std::basic_string< C, T, A > &str, const std::basic_string< C, T, A > &removed)
文字列の先頭からの指定文字の除去
Definition utility.h:244