59class CLASS_DECL_ACME
str
85 template < prototype_
character CHAR_TYPE >
86 static inline string_base < const CHAR_TYPE * > repeat(
const CHAR_TYPE * psz, character_count c);
92 static inline ::i32 compare_ignore_case(
const string & left,
const string & right,
size_t len = 0);
93 static inline bool equal_ignore_case(
const string & left,
const string & right,
size_t len = 0);
96 static void increment_digit_letter(
string &
str);
98 static void copy(
string &
str, const ::scoped_string & scopedstr, ::i32 iCount);
100 static string replace_with(const ::scoped_string & scopedstrNew, const ::scoped_string & scopedstrOld, const ::scoped_string & scopedstr, character_count iStart = 0);
101 static string case_insensitive_replace_with(const ::scoped_string & scopedstrNew, const ::scoped_string & scopedstrOld, const ::scoped_string & scopedstr, character_count iStart = 0);
102 static ::collection::count replace_with_ci_count(const ::scoped_string & scopedstrNew, const ::scoped_string & scopedstrOld, const ::scoped_string & scopedstr, character_count iStart = 0);
103 static ::collection::count utf8_replace_with(
string &
str, const ::scoped_string & scopedstrNew, const ::scoped_string & scopedstrOld, character_count iStart = 0);
104 static string utf8_replace_with(const ::scoped_string & scopedstrNew, const ::scoped_string & scopedstrOld, const ::scoped_string & scopedstr, character_count iStart = 0);
106 static inline string find_replace(const ::scoped_string & scopedstrOld, const ::scoped_string & scopedstrNew, const ::scoped_string & scopedstr, character_count iStart = 0)
108 return replace_with(scopedstrNew, scopedstrOld, scopedstr, iStart);
110 static inline string case_insensitive_find_replace(const ::scoped_string & scopedstrOld, const ::scoped_string & scopedstrNew, const ::scoped_string & scopedstr, character_count iStart = 0)
112 return case_insensitive_replace_with(scopedstrNew, scopedstrOld, scopedstr, iStart);
114 static inline ::collection::count case_insensitive_find_replace_count(const ::scoped_string & scopedstrOld, const ::scoped_string & scopedstrNew, const ::scoped_string & scopedstr, character_count iStart = 0)
116 return replace_with_ci_count(scopedstrNew, scopedstrOld, scopedstr, iStart);
118 static inline ::collection::count utf8_find_replace(
string &
str, const ::scoped_string & scopedstrOld, const ::scoped_string & scopedstrNew, character_count iStart = 0)
120 return utf8_replace_with(
str, scopedstrNew, scopedstrOld, iStart);
122 static inline string utf8_find_replace(const ::scoped_string & scopedstrOld, const ::scoped_string & scopedstrNew, const ::scoped_string & scopedstr, character_count iStart = 0)
124 return utf8_replace_with(scopedstrNew, scopedstrOld, scopedstr, iStart);
127 static string random_replace(
::particle * pparticle,
const string_array_base & straNew,
const string_array_base & straOld, const ::scoped_string & scopedstr);
129 static character_count find_first(
const string_array_base & straSearch, ::collection::index & iFound, const ::scoped_string & scopedstr, ::collection::index iStart = 0);
131 static character_count case_insensitive_find(const ::scoped_string & scopedstrFind, const ::scoped_string & scopedstr, character_count iStart = 0);
133 static character_count utf8_find(const ::scoped_string & scopedstrFind, const ::scoped_string & scopedstr, character_count iStart = 0);
135 static character_count find_file_extension(const ::scoped_string & scopedstrExtension, const ::scoped_string & scopedstr, character_count iStart = 0, character_count iLast = -1);
137 static character_count find_ww(const ::scoped_string & scopedstrFind, const ::scoped_string & scopedstr, character_count iStart = 0);
138 static character_count find_wwci(const ::scoped_string & scopedstrFind, const ::scoped_string & scopedstr, character_count iStart = 0);
139 static character_count find_aww(const ::scoped_string & scopedstrFind, const ::scoped_string & scopedstr, character_count iStart = 0);
140 static character_count find_awwci(const ::scoped_string & scopedstrFind, const ::scoped_string & scopedstr, character_count iStart = 0);
141 static string has_character(const ::scoped_string & scopedstrIfHasChar, const ::scoped_string & scopedstrBefore =
nullptr, const ::scoped_string & scopedstrAfter =
nullptr, const ::scoped_string & scopedstrDoesnt =
nullptr);
142 static bool has_upper(const ::scoped_string & scopedstr);
143 static bool has_lower(const ::scoped_string & scopedstr);
144 static bool has_digit(const ::scoped_string & scopedstr);
145 static void calc_v1(const ::scoped_string & scopedstr,
bool & bHasUpper,
bool & bHasLower,
bool & bHasDigit);
146 static bool has_one_v1(const ::scoped_string & scopedstr,
bool & bHasUpper,
bool & bHasLower,
bool & bHasDigit);
147 static bool has_all_v1(const ::scoped_string & scopedstr,
bool & bHasUpper,
bool & bHasLower,
bool & bHasDigit);
148 static bool has_all_v1(const ::scoped_string & scopedstr);
149 static string if_null(const ::scoped_string & scopedstr, const ::scoped_string & scopedstrIfNull =
nullptr);
158 static string block(::ansi_character ch, ::i32 iSize);
159 static void fill(
string &
str, ::ansi_character ch);
185 static bool trim_any_quotes(
string &
str);
186 static bool paired_trim(
string &
str, ::ansi_character ch);
187 static bool trim(
string &
str);
188 static bool _008Trim(
string &
str);
193 static string & zero_pad(
string &
str, character_count iPad);
194 static string zero_padded(const ::scoped_string & scopedstr, character_count iPad);
195 static ::i32 get_escaped_char(const_char_pointer psz, character_count pos, character_count & retPos);
196 static bool get_curly_content(const_char_pointer psz,
string &
str);
197 static bool is_simple_natural(const_char_pointer psz, character_count iCount = -1);
198 static bool is_natural(const ::scoped_string & scopedstr);
199 static bool is_integer(const ::scoped_string & scopedstr);
201 static string ansi_lower(const ::scoped_string & scopedstr);
202 static string ansi_upper(const ::scoped_string & scopedstr);
205 static string get_word(const ::scoped_string & scopedstr, const ::scoped_string & scopedstrSeparator,
bool bWithSeparator =
false,
bool bEndIsSeparator =
true);
207 static string token(
string &
str, const ::scoped_string & scopedstrSeparatorText,
bool bWithSeparator =
false);
211 static string line(
string &
str,
bool bWithNewLine =
false);
213 static string pad(const ::scoped_string & scopedstr, ::collection::count iLen, const ::scoped_string & scopedstrPattern, enum_pad epad);
215 static inline character_count length(const_char_pointer pansichar) {
return ansi_length(pansichar); }
216 static inline character_count length(const ::wd16_character * pwd16char) {
return wd16_length(pwd16char); }
217 static inline character_count length(const ::wd32_character * pwd32char) {
return wd32_length(pwd32char); }
220 template <
typename TYPE >
221 static inline TYPE from_string(const_char_pointer psz);
224 static bool simple_escaped(const ::scoped_string & scopedstr, character_count pos);
233 static string q_valid(const ::scoped_string & scopedstr);
236 static inline ::ansi_character * dup(const_char_pointer psz)
242 return ansi_dup(psz);
256 static string signed_f64(::f64 d);
258 static string signed_int(::i32 i);
260 static bool is_true(const ::scoped_string & scopedstr);
263 static inline character_count utf8_dec_len(const_char_pointer pszBeg, const_char_pointer psz);
265 static inline character_count utf8_inc_len(const_char_pointer psz);
267 static inline bool namespaced(const_char_pointer psz, const_char_pointer pszNamespace, const_char_pointer pszSeparator =
"::");
271 static void fix_eol(
string &
str);
274 static bool to(::i64 & i, const ::scoped_string & scopedstrParam);
275 static bool to(::i32 & i, const ::scoped_string & scopedstrParam);
276 static bool to(::u64 & u, const ::scoped_string & scopedstrParam);
277 static bool to(::u32 & u, const ::scoped_string & scopedstrParam);
280 static bool to(::i32 & i, ::i32 iBase, const ::scoped_string & scopedstrParam);
281 static bool to(::i64 & i, ::i32 iBase, const ::scoped_string & scopedstrParam);
282 static bool to(::u64 & u, ::i32 iBase, const ::scoped_string & scopedstrParam);
283 static bool to(::u32 & u, ::i32 iBase, const ::scoped_string & scopedstrParam);
286 static iptr to_iptr(const ::scoped_string & scopedstr);
287 static ::i32 to_int(const ::scoped_string & scopedstr);
288 static ::u32 to_u32(const ::scoped_string & scopedstr);
291 static ::i64 to_i64(const ::scoped_string & scopedstr);
292 static ::u64 to_u64(const ::scoped_string & scopedstr);
296 static inline ::i32 to_with_fallback(const ::scoped_string & scopedstr, ::i32 iDefault);
297 static inline ::i64 to_with_fallback(const ::scoped_string & scopedstr, ::i64 iDefault);
298 static inline ::i32 to_with_fallback(const ::scoped_string & scopedstr, ::i32 iDefault, ::i32 iBase);
299 static inline ::i64 to_with_fallback(const ::scoped_string & scopedstr, ::i64 iDefault, ::i32 iBase);
304 static bool begins_ci_iws(const ::scoped_string & scopedstr, const ::scoped_string & scopedstrPrefix);
305 static bool begins_ci_iws(
const wstring & wstr,
const wstring & wstrPrefix);
321 static inline character_count unichar_count(const_char_pointer pstr);
322 static inline character_count unichar_count(const ::wd16_character * pstr);
323 static inline character_count unichar_count(const ::wd32_character * pstr);
326 static void get_lines(::string &
str,
bool bFinal, const ::function <
void(const ::scoped_string &,
bool bCarriage) > & functionNewLine);
329 static void get_lines(::string_array_base & stra, ::string &
str, const ::scoped_string & scopedstrPrefix,
bool bFinal,
::particle * pparticleSynchronization =
nullptr,
::file::file * pfileLines =
nullptr);
332 static character_count x_find_index(const ::scoped_string& scopedstr, const ::scoped_string& scopedstrSearchedTerm);
333 static bool x_contains(const ::scoped_string& scopedstr, const ::scoped_string& scopedstrSearchedTerm);
335 static bool x_contains(const ::scoped_string& scopedstr, const ::string_array_base & straSearchedTerm);