6#define __XTD_CORE_INTERNAL__
11#undef __XTD_CORE_INTERNAL__
12#define __XTD_STD_INTERNAL__
14#undef __XTD_STD_INTERNAL__
34template<
class ...args_t>
36template<
class target_t,
class source_t>
37std::basic_string<target_t> __xtd_convert_to_string(std::basic_string<source_t>&& str)
noexcept;
38template<
class target_t,
class source_t>
39std::basic_string<target_t> __xtd_convert_to_string(
const std::basic_string<source_t>& str)
noexcept;
40std::basic_string<char> __xtd_demangle(
const std::basic_string<char>& value)
noexcept;
41std::basic_string<char> __xtd_get_class_name(
const std::type_info& value)
noexcept;
42std::basic_string<char> __xtd_get_full_class_name(
const std::type_info& value)
noexcept;
65 template<
class char_t,
class traits_t,
class allocator_t>
73 using base_type = std::basic_string<char_t, traits_t, allocator_t>;
89 using pointer =
typename base_type::pointer;
162 basic_string(std::basic_string<char_t>&& str) : chars_ {std::move(str)} {}
166 if constexpr(std::is_same_v<char, char_t>) chars_ = str.chars_;
167 else chars_ = __xtd_convert_to_string<value_type>(str.chars_);
172 if constexpr(std::is_same_v<xtd::char16, char_t>) chars_ = str.chars_;
173 else chars_ = __xtd_convert_to_string<value_type>(str.chars_);
178 if constexpr(std::is_same_v<xtd::char32, char_t>) chars_ = str.chars_;
179 else chars_ = __xtd_convert_to_string<value_type>(str.chars_);
184 if constexpr(std::is_same_v<xtd::char8, char_t>) chars_ = str.chars_;
185 else chars_ = __xtd_convert_to_string<value_type>(str.chars_);
190 if constexpr(std::is_same_v<xtd::wchar, char_t>) chars_ = str.chars_;
191 else chars_ = __xtd_convert_to_string<value_type>(str.chars_);
196 if constexpr(std::is_same_v<char, char_t>) chars_ = str;
197 else chars_ = __xtd_convert_to_string<value_type>(str);
202 if constexpr(std::is_same_v<xtd::char16, char_t>) chars_ = str;
203 else chars_ = __xtd_convert_to_string<value_type>(str);
208 if constexpr(std::is_same_v<xtd::char32, char_t>) chars_ = str;
209 else chars_ = __xtd_convert_to_string<value_type>(str);
214 if constexpr(std::is_same_v<xtd::char8, char_t>) chars_ = str;
215 else chars_ = __xtd_convert_to_string<value_type>(str);
220 if constexpr(std::is_same_v<xtd::wchar, char_t>) chars_ = str;
221 else chars_ = __xtd_convert_to_string<value_type>(str);
247 if constexpr(std::is_same_v<char, char_t>) chars_ = std::basic_string<char>(str);
248 else chars_ = __xtd_convert_to_string<value_type>(std::basic_string<char>(str));
254 if constexpr(std::is_same_v<xtd::char16, char_t>) chars_ = std::basic_string<xtd::char16>(str);
255 else chars_ = __xtd_convert_to_string<value_type>(std::basic_string<xtd::char16>(str));
261 if constexpr(std::is_same_v<xtd::char32, char_t>) chars_ = std::basic_string<xtd::char32>(str);
262 else chars_ = __xtd_convert_to_string<value_type>(std::basic_string<xtd::char32>(str));
268 if constexpr(std::is_same_v<xtd::char8, char_t>) chars_ = std::basic_string<xtd::char8>(str);
269 else chars_ = __xtd_convert_to_string<value_type>(std::basic_string<xtd::char8>(str));
275 if constexpr(std::is_same_v<xtd::wchar, char_t>) chars_ = std::basic_string<xtd::wchar>(str);
276 else chars_ = __xtd_convert_to_string<value_type>(std::basic_string<xtd::wchar>(str));
283 if constexpr(std::is_same_v<char, char_t>) chars_ = std::basic_string<char>(str,
count);
284 else chars_ = __xtd_convert_to_string<value_type>(std::basic_string<char>(str,
count));
290 if constexpr(std::is_same_v<xtd::char16, char_t>) chars_ = std::basic_string<xtd::char16>(str,
count);
291 else chars_ = __xtd_convert_to_string<value_type>(std::basic_string<xtd::char16>(str,
count));
297 if constexpr(std::is_same_v<xtd::char32, char_t>) chars_ = std::basic_string<xtd::char32>(str,
count);
298 else chars_ = __xtd_convert_to_string<value_type>(std::basic_string<xtd::char32>(str,
count));
304 if constexpr(std::is_same_v<xtd::char8, char_t>) chars_ = std::basic_string<xtd::char8>(str,
count);
305 else chars_ = __xtd_convert_to_string<value_type>(std::basic_string<xtd::char8>(str,
count));
311 if constexpr(std::is_same_v<xtd::wchar, char_t>) chars_ = std::basic_string<xtd::wchar>(str,
count);
312 else chars_ = __xtd_convert_to_string<value_type>(std::basic_string<xtd::wchar>(str,
count));
317 template<
class input_iterator_t>
321 basic_string(
const std::basic_string_view<char_t>& str) : chars_(str) {}
593 if (ignore_case)
return to_upper().chars_ == value.to_upper().chars_;
594 return chars_ == value.chars_;
607 return chars_.rfind(value) ==
length() - 1;
624 return chars_.rfind(value) + value.length() ==
length();
863 return chars_[index_];
865 bool move_next()
override {
return ++index_ < chars_.length();}
892 auto result =
find(value, start_index);
893 return result > start_index +
count ?
npos : result;
912 auto result =
find(value, start_index);
913 return result > start_index +
count ?
npos : result;
948 result.chars_.insert(start_index, value);
970 auto result = chars_.rfind(value, start_index +
count - value.
length());
971 return result < start_index ?
npos : result;
992 auto result = chars_.rfind(value, start_index +
count - 1);
993 return result < start_index ?
npos : result;
1061 std::wstringstream ss;
1062 if constexpr(std::is_same_v<xtd::wchar, value_type>) ss << std::quoted(chars_, delimiter,
escape);
1063 else ss << std::quoted(__xtd_convert_to_string<xtd::wchar>(chars_),
static_cast<xtd::wchar>(delimiter),
static_cast<xtd::wchar>(
escape));
1077 auto result =
self_;
1078 result.chars_.erase(start_index,
count);
1093 auto result =
self_;
1094 auto old_size = old_string.length();
1095 auto new_size = new_string.length();
1098 index = result.find(old_string, index);
1099 if (index ==
npos)
break;
1100 if (old_size == new_size) result.chars_.replace(index, old_size, new_string);
1102 result.chars_.erase(index, old_string.length());
1103 result.chars_.insert(index, new_string);
1105 index += new_string.length();
1259 return find(value) == 0;
1278 return find(value) == 0;
1293 return chars_.substr(pos);
1303 return chars_.substr(pos,
count);
1313 return substr(start_index);
1351 std::for_each(chars_.begin(), chars_.end(), [&](
auto c) {result += static_cast<value_type>(std::tolower(c));});
1359 if constexpr(std::is_same_v<char, char_t>)
return chars_;
1360 else return __xtd_convert_to_string<char>(chars_);
1370 if constexpr(std::is_same_v<xtd::char16, char_t>)
return chars_;
1371 else return __xtd_convert_to_string<xtd::char16>(chars_);
1377 if constexpr(std::is_same_v<xtd::char32, char_t>)
return chars_;
1378 else return __xtd_convert_to_string<xtd::char32>(chars_);
1384 if constexpr(std::is_same_v<xtd::char8, char_t>)
return chars_;
1385 else return __xtd_convert_to_string<xtd::char8>(chars_);
1392 std::for_each(chars_.begin(), chars_.end(), [&](
auto c) {result += static_cast<value_type>(std::toupper(c));});
1399 if constexpr(std::is_same_v<xtd::wchar, char_t>)
return chars_;
1400 else return __xtd_convert_to_string<xtd::wchar>(chars_);
1513 static int32 compare(
const basic_string & str_a,
xtd::size index_a,
const basic_string & str_b,
xtd::size index_b,
xtd::size length,
bool ignore_case) {
return compare(str_a, index_a, str_b, index_b,
length, ignore_case ?
xtd::string_comparison::ordinal_ignore_case :
xtd::string_comparison::ordinal);}
1542 template<
class object_a_t,
class object_b_t,
class object_c_t,
class object_d_t>
1543 static basic_string concat(object_a_t obj_a, object_b_t obj_b, object_c_t obj_c, object_d_t obj_d)
noexcept {
return format(
"{}{}{}{}", obj_a, obj_b, obj_c, obj_d);}
1555 template<
class object_a_t,
class object_b_t,
class object_c_t>
1556 static basic_string concat(object_a_t obj_a, object_b_t obj_b, object_c_t obj_c)
noexcept {
return format(
"{}{}{}", obj_a, obj_b, obj_c);}
1566 template<
class object_a_t,
class object_b_t>
1574 template<
class other_
char_t>
1576 static basic_string concat(
const std::initializer_list<basic_string>& values)
noexcept {
1578 std::for_each(values.begin(), values.end(), [&](
const auto & item) {result += item;});
1581 static basic_string concat(
const std::initializer_list<const_pointer>& values)
noexcept {
1583 std::for_each(values.begin(), values.end(), [&](
const auto & item) {result += item;});
1586 template<
class other_
char_t>
1587 static basic_string concat(
const std::initializer_list<const other_char_t*>& values)
noexcept {
1589 std::for_each(values.begin(), values.end(), [&](
const auto & item) {result += item;});
1596 template<
class object_t>
1599 template<
class object_t>
1602 for (
const auto& arg : args)
1603 result +=
format(
"{}", arg);
1610 template<
class value_t>
1612 return format(
"{}", value);
1636 if constexpr(std::is_same_v<char, char_t>)
return __xtd_demangle(name.
chars());
1637 else return __xtd_demangle(__xtd_convert_to_string<char>(name.
chars()));
1651 template<
class char_a_t,
class char_b_t>
1667 template<
class char_a_t,
class char_b_t>
1676 template<
class ...args_t>
1686 template<
class ...args_t>
1700 template<
class collection_t>
1704 for (
const auto& item : values)
1715 template<
class collection_t>
1725 template<
class collection_t>
1730 for (
const auto& item : values) {
1732 if (++
i >= index +
count)
break;
1738 template<
class value_t>
1740 template<
class value_t>
1742 template<
class value_t>
1749 template<
class value_t>
1814 template<
class ...args_t>
1821 template<
class value_t>
1841 return chars_[index ==
epos ?
length() - 1 : index];
1846 operator const base_type& ()
const noexcept {
return chars_;}
1852 if constexpr(std::is_same<char_t, char>::value) chars_ = str.chars_;
1853 else chars_ = __xtd_convert_to_string<value_type>(str.chars());
1860 if constexpr(std::is_same<char_t, xtd::char16>::value) chars_ = str.chars_;
1861 else chars_ = __xtd_convert_to_string<value_type>(str.chars());
1868 if constexpr(std::is_same<char_t, xtd::char32>::value) chars_ = str.chars_;
1869 else chars_ = __xtd_convert_to_string<value_type>(str.chars());
1876 if constexpr(std::is_same<char_t, xtd::char8>::value) chars_ = str.chars_;
1877 else chars_ = __xtd_convert_to_string<value_type>(str.chars());
1884 if constexpr(std::is_same<char_t, xtd::wchar>::value) chars_ = str.chars_;
1885 else chars_ = __xtd_convert_to_string<value_type>(str.chars());
1893 if constexpr(std::is_same<char_t, char>::value) chars_ = std::move(str.chars_);
1894 else chars_ = std::move(__xtd_convert_to_string<value_type>(std::move(str.chars_)));
1901 if constexpr(std::is_same<char_t, xtd::char16>::value) chars_ = std::move(str.chars_);
1902 else chars_ = std::move(__xtd_convert_to_string<value_type>(std::move(str.chars_)));
1909 if constexpr(std::is_same<char_t, xtd::char32>::value) chars_ = std::move(str.chars_);
1910 else chars_ = std::move(__xtd_convert_to_string<value_type>(std::move(str.chars_)));
1917 if constexpr(std::is_same<char_t, xtd::char8>::value) chars_ = std::move(str.chars_);
1918 else chars_ = std::move(__xtd_convert_to_string<value_type>(std::move(str.chars_)));
1925 if constexpr(std::is_same<char_t, xtd::wchar>::value) chars_ = std::move(str.chars_);
1926 else chars_ = std::move(__xtd_convert_to_string<value_type>(std::move(str.chars_)));
1934 if constexpr(std::is_same<char_t, char>::value) chars_ = str;
1935 else chars_ = __xtd_convert_to_string<value_type>(str);
1942 if constexpr(std::is_same<char_t, xtd::char16>::value) chars_ = str;
1943 else chars_ = __xtd_convert_to_string<value_type>(str);
1950 if constexpr(std::is_same<char_t, xtd::char32>::value) chars_ = str;
1951 else chars_ = __xtd_convert_to_string<value_type>(str);
1958 if constexpr(std::is_same<char_t, xtd::char8>::value) chars_ = str;
1959 else chars_ = __xtd_convert_to_string<value_type>(str);
1966 if constexpr(std::is_same<char_t, xtd::wchar>::value) chars_ = str;
1967 else chars_ = __xtd_convert_to_string<value_type>(str);
1975 if constexpr(std::is_same<char_t, char>::value) chars_ = std::move(str);
1976 else chars_ = std::move(__xtd_convert_to_string<value_type>(std::move(str)));
1983 if constexpr(std::is_same<char_t, xtd::char16>::value) chars_ = std::move(str);
1984 else chars_ = std::move(__xtd_convert_to_string<value_type>(std::move(str)));
1991 if constexpr(std::is_same<char_t, xtd::char32>::value) chars_ = std::move(str);
1992 else chars_ = std::move(__xtd_convert_to_string<value_type>(std::move(str)));
1999 if constexpr(std::is_same<char_t, xtd::char8>::value) chars_ = std::move(str);
2000 else chars_ = std::move(__xtd_convert_to_string<value_type>(std::move(str)));
2007 if constexpr(std::is_same<char_t, xtd::wchar>::value) chars_ = std::move(str);
2008 else chars_ = std::move(__xtd_convert_to_string<value_type>(std::move(str)));
2018 if constexpr(std::is_same_v<char, char_t>) chars_ = std::basic_string<char>(str);
2019 else chars_ = __xtd_convert_to_string<value_type>(std::basic_string<char>(str));
2028 if constexpr(std::is_same_v<xtd::char16, char_t>) chars_ = std::basic_string<xtd::char16>(str);
2029 else chars_ = __xtd_convert_to_string<value_type>(std::basic_string<xtd::char16>(str));
2038 if constexpr(std::is_same_v<xtd::char32, char_t>) chars_ = std::basic_string<xtd::char32>(str);
2039 else chars_ = __xtd_convert_to_string<value_type>(std::basic_string<xtd::char32>(str));
2048 if constexpr(std::is_same_v<xtd::char8, char_t>) chars_ = std::basic_string<xtd::char8>(str);
2049 else chars_ = __xtd_convert_to_string<value_type>(std::basic_string<xtd::char8>(str));
2058 if constexpr(std::is_same_v<xtd::wchar, char_t>) chars_ = std::basic_string<xtd::wchar>(str);
2059 else chars_ = __xtd_convert_to_string<value_type>(std::basic_string<xtd::wchar>(str));
2139 if constexpr(std::is_same_v<char, char_t>) chars_ += str.chars_;
2140 else chars_ += __xtd_convert_to_string<value_type>(str.chars_);
2147 if constexpr(std::is_same_v<xtd::char16, char_t>) chars_ += str.chars_;
2148 else chars_ += __xtd_convert_to_string<value_type>(str.chars_);
2155 if constexpr(std::is_same_v<xtd::char32, char_t>) chars_ += str.chars_;
2156 else chars_ += __xtd_convert_to_string<value_type>(str.chars_);
2163 if constexpr(std::is_same_v<xtd::char8, char_t>) chars_ += str.chars_;
2164 else chars_ += __xtd_convert_to_string<value_type>(str.chars_);
2171 if constexpr(std::is_same_v<xtd::wchar, char_t>) chars_ += str.chars_;
2172 else chars_ += __xtd_convert_to_string<value_type>(str.chars_);
2180 if constexpr(std::is_same_v<char, char_t>) chars_ += std::move(str.chars_);
2181 else chars_ += __xtd_convert_to_string<value_type>(std::move(str.chars_));
2188 if constexpr(std::is_same_v<xtd::char16, char_t>) chars_ += std::move(str.chars_);
2189 else chars_ += __xtd_convert_to_string<value_type>(std::move(str.chars_));
2196 if constexpr(std::is_same_v<xtd::char32, char_t>) chars_ += std::move(str.chars_);
2197 else chars_ += __xtd_convert_to_string<value_type>(std::move(str.chars_));
2204 if constexpr(std::is_same_v<xtd::char8, char_t>) chars_ += std::move(str.chars_);
2205 else chars_ += __xtd_convert_to_string<value_type>(std::move(str.chars_));
2212 if constexpr(std::is_same_v<xtd::wchar, char_t>) chars_ += std::move(str.chars_);
2213 else chars_ += __xtd_convert_to_string<value_type>(std::move(str.chars_));
2221 if constexpr(std::is_same_v<char, char_t>) chars_ += str;
2222 else chars_ += __xtd_convert_to_string<value_type>(str);
2229 if constexpr(std::is_same_v<xtd::char16, char_t>) chars_ += str;
2230 else chars_ += __xtd_convert_to_string<value_type>(str);
2237 if constexpr(std::is_same_v<xtd::char32, char_t>) chars_ += str;
2238 else chars_ += __xtd_convert_to_string<value_type>(str);
2245 if constexpr(std::is_same_v<xtd::char8, char_t>) chars_ += str;
2246 else chars_ += __xtd_convert_to_string<value_type>(str);
2253 if constexpr(std::is_same_v<xtd::wchar, char_t>) chars_ += str;
2254 else chars_ += __xtd_convert_to_string<value_type>(str);
2379 auto result = std::move(lhs);
2380 result += std::move(rhs);
2388 auto result = std::move(lhs);
2389 result += std::move(rhs);
2397 auto result = std::move(lhs);
2398 result += std::move(rhs);
2406 auto result = std::move(lhs);
2407 result += std::move(rhs);
2415 auto result = std::move(lhs);
2416 result += std::move(rhs);
2425 auto result = std::move(lhs);
2434 auto result = std::move(lhs);
2443 auto result = std::move(lhs);
2452 auto result = std::move(lhs);
2461 auto result = std::move(lhs);
2472 result += std::move(rhs);
2481 result += std::move(rhs);
2490 result += std::move(rhs);
2499 result += std::move(rhs);
2508 result += std::move(rhs);
2564 if constexpr(std::is_same_v<char, char_t>) result += rhs.
chars();
2565 else result += __xtd_convert_to_string<char>(rhs.
chars());
2574 if constexpr(std::is_same_v<xtd::char16, char_t>) result += rhs.
chars();
2575 else result += __xtd_convert_to_string<xtd::char16>(rhs.
chars());
2584 if constexpr(std::is_same_v<xtd::char32, char_t>) result += rhs.
chars();
2585 else result += __xtd_convert_to_string<xtd::char32>(rhs.
chars());
2594 if constexpr(std::is_same_v<xtd::char8, char_t>) result += rhs.
chars();
2595 else result += __xtd_convert_to_string<xtd::char8>(rhs.
chars());
2604 if constexpr(std::is_same_v<xtd::wchar, char_t>) result += rhs.
chars();
2605 else result += __xtd_convert_to_string<xtd::wchar>(rhs.
chars());
2660 auto result = std::move(lhs);
2669 auto result = std::move(lhs);
2678 auto result = std::move(lhs);
2687 auto result = std::move(lhs);
2696 auto result = std::move(lhs);
2753 result += std::move(rhs);
2762 result += std::move(rhs);
2771 result += std::move(rhs);
2780 result += std::move(rhs);
2789 result += std::move(rhs);
2844 auto result = std::move(lhs);
2853 auto result = std::move(lhs);
2862 auto result = std::move(lhs);
2871 auto result = std::move(lhs);
2880 auto result = std::move(lhs);
2937 result += std::move(rhs);
2946 result += std::move(rhs);
2955 result += std::move(rhs);
2964 result += std::move(rhs);
2973 result += std::move(rhs);
2987 if constexpr(std::is_same_v<char, char_t>)
return stream << str.
chars();
2988 else return stream << __xtd_convert_to_string<char>(str.
chars());
3007 auto s = std::basic_string<char> {};
3021 auto s = std::basic_string<xtd::wchar> {};
3033 [[deprecated(
"Replaced by xtd::basic_string::is_empty(const xtd::basic_string&) - Will be removed in version 0.4.0.")]]
3043 template<
class object_t>
3044 [[deprecated(
"Replaced by typeof_<object_t>().name() - Will be removed in version 0.4.0.")]]
3050 template<
class object_t>
3051 [[deprecated(
"Replaced by typeof_(object).name() - Will be removed in version 0.4.0.")]]
3057 [[deprecated(
"Replaced by typeof_(info).name() - Will be removed in version 0.4.0.")]]
3063 template<
class object_t>
3064 [[deprecated(
"Replaced by typeof_<object_t>().full_name() - Will be removed in version 0.4.0.")]]
3070 template<
class object_t>
3071 [[deprecated(
"Replaced by typeof_(object).full_name() - Will be removed in version 0.4.0.")]]
3077 [[deprecated(
"Replaced by typeof_(info).full_name() - Will be removed in version 0.4.0.")]]
3088 static const
xtd::array<value_type> default_split_separators;
3089 static const
xtd::array<value_type> default_trim_chars;
3091 template<class arg_t>
3092 static auto convert_param(arg_t&& arg) noexcept {
3093 if constexpr(std::is_same<std::remove_cv_t<std::remove_reference_t<arg_t>>, std::string>::value)
return std::forward<arg_t>(arg).c_str();
3094 else if constexpr(std::is_same<std::remove_cv_t<std::remove_reference_t<arg_t>>, std::u16string>::value)
return std::forward<arg_t>(arg).c_str();
3095 else if constexpr(std::is_same<std::remove_cv_t<std::remove_reference_t<arg_t>>, std::u32string>::value)
return std::forward<arg_t>(arg).c_str();
3096 else if constexpr(std::is_same<std::remove_cv_t<std::remove_reference_t<arg_t>>, std::u8string>::value)
return std::forward<arg_t>(arg).c_str();
3097 else if constexpr(std::is_same<std::remove_cv_t<std::remove_reference_t<arg_t>>, std::wstring>::value)
return std::forward<arg_t>(arg).c_str();
3098 else if constexpr(std::is_same<std::remove_cv_t<std::remove_reference_t<arg_t>>,
basic_string>::value)
return std::forward<arg_t>(arg).c_str();
3099 else return std::forward<arg_t>(arg);
3103 auto length = full_name.last_index_of(
"<");
3105 if (full_name.last_index_of(
"::", 0,
length) ==
npos)
return full_name;
3106 return full_name.substring(full_name.last_index_of(
"::", 0,
length) + 2);
3113#define __XTD_BASIC_STRING_INTERNAL__
3115#undef __XTD_BASIC_STRING_INTERNAL__
3119 template<
typename char_t>
3120 struct hash<xtd::basic_string<char_t>> {
3121 xtd::size operator()(
const xtd::basic_string<char_t>& s)
const noexcept {
return s.get_hash_code();}
Contains xtd::basic_string class.
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:64
Represents text as a sequence of character units.
Definition basic_string.hpp:66
basic_string(const basic_string< xtd::char32 > &str) noexcept
Initializes a new instance of xtd::basic_string with specified string to copy.
Definition basic_string.hpp:177
basic_string trim(value_type trim_char) const noexcept
Removes all leading and trailing occurrences of a character specified from the specified xtd::basic_s...
basic_string(const xtd::char8 *str, xtd::size count)
Initializes a new instance of xtd::basic_string with specified substring and count characters.
Definition basic_string.hpp:302
std::basic_string< char_t, traits_t, allocator_t > base_type
Represents the basic string base type.
Definition basic_string.hpp:73
static basic_string concat(object_a_t obj_a, object_b_t obj_b) noexcept
Concatenates two specified instances of object.
Definition basic_string.hpp:1567
xtd::size index_of(value_type value) const noexcept
Reports the index of the first occurrence of the specified character in this basic_string.
Definition basic_string.hpp:898
static int32 compare(const basic_string &str_a, const basic_string &str_b, xtd::string_comparison comparison_type) noexcept
Compares two specified basic_string objects using the specified rules, and returns an integer that in...
Definition basic_string.hpp:1486
basic_string trim_end(const xtd::array< value_type > &trim_chars) const noexcept
Removes all trailing occurrences of a set of characters specified in an array from the specified xtd:...
basic_string to_lower() const noexcept
Returns a copy of the current xtd::basic_string converted to lowercase.
Definition basic_string.hpp:1349
static value_t parse(const basic_string &str)
Converts a basic_string into a value_t type.
Definition basic_string.hpp:1750
basic_string pad_left(xtd::size total_width) const noexcept
Right-aligns the characters in this basic_string, padding with spaces on the left for a specified tot...
Definition basic_string.hpp:1022
static const basic_string empty_string
Definition basic_string.hpp:111
bool ends_with(const basic_string &value, xtd::string_comparison comparison_type) const noexcept
Determines whether the end of this basic_string matches the specified basic_string when compared usin...
Definition basic_string.hpp:622
static basic_string class_name(const object_t &object)
Gets the class name of the specified object.
Definition basic_string.hpp:3052
size_type find_last_not_of(const_pointer s, size_type pos, size_type count) const
Finds the last character equal to none of the characters in the given character sequence....
Definition basic_string.hpp:820
allocator_type get_allocator() const
Returns the allocator associated with the string.
Definition basic_string.hpp:848
xtd::size index_of(value_type value, xtd::size start_index, xtd::size count) const
Reports the index of the first occurrence of the specified character in this basic_string....
Definition basic_string.hpp:910
xtd::size index_of(value_type value, xtd::size start_index) const
Reports the index of the first occurrence of the specified character in this basic_string....
Definition basic_string.hpp:903
basic_string trim() const noexcept
Removes all leading and trailing occurrences of white-space characters from the specified xtd::basic_...
Definition basic_string.hpp:1407
xtd::array< basic_string > split() const noexcept
Splits this basic_string into substrings that are based on the default white-space characters....
basic_string(const xtd::char32 *str)
Initializes a new instance of xtd::basic_string with specified string to copy.
Definition basic_string.hpp:259
size_type find_first_of(const basic_string &str) const
Finds the first character equal to one of the characters in the given character sequence....
Definition basic_string.hpp:674
xtd::size index_of_any(const xtd::array< value_type > &values, xtd::size start_index) const
Reports the index of the first occurrence in this instance of any character in a specified array of c...
typename base_type::allocator_type allocator_type
Represents the basic string allocator type.
Definition basic_string.hpp:79
basic_string substring(xtd::size start_index, xtd::size length) const
Retrieves a substring from this instance. The substring starts at a specified character position and ...
Definition basic_string.hpp:1320
basic_string(char character, xtd::size count)
Initializes a new instance of xtd::basic_string with specified count copies of character.
Definition basic_string.hpp:226
size_type find_last_of(char_t ch, size_type pos) const
Finds the last character equal to one of characters in the given character sequence....
Definition basic_string.hpp:800
bool ends_with(value_type value, bool ignore_case) const noexcept
Determines whether the end of this basic_string matches the specified character, ignoring or honoring...
Definition basic_string.hpp:605
basic_string(const char *str, xtd::size count)
Initializes a new instance of xtd::basic_string with specified substring and count characters.
Definition basic_string.hpp:281
enumerator_type get_enumerator() const noexcept override
Returns an enumerator that iterates through a collection.
Definition basic_string.hpp:858
static basic_string demangle(const basic_string &name)
Gets demangled basic_string of name,.
Definition basic_string.hpp:1635
basic_string(const std::basic_string_view< char_t > &str)
Initializes a new instance of xtd::basic_string with specified std::basic_string_view.
Definition basic_string.hpp:321
basic_string(xtd::wchar character, xtd::size count)
Initializes a new instance of xtd::basic_string with specified count copies of character.
Definition basic_string.hpp:242
int32 compare(size_type pos1, size_type count1, const basic_string &str) const
Compares two character sequences.
Definition basic_string.hpp:431
typename xtd::collections::generic::enumerator< value_type > enumerator_type
Represents the basic string enumerator type.
Definition basic_string.hpp:103
size_type rfind(const_pointer s, size_type pos, size_type count) const
Finds the last substring that is equal to the given character sequence. The search begins at pos and ...
Definition basic_string.hpp:1127
size_type find_last_not_of(char_t ch, size_type pos) const
Finds the last character equal to none of the characters in the given character sequence....
Definition basic_string.hpp:844
size_type rfind(const_pointer s) const
Finds the last substring that is equal to the given character sequence. The search begins at xtd::bas...
Definition basic_string.hpp:1133
size_type rfind(const basic_string &str) const
Finds the last substring that is equal to the given character sequence. The search begins at xtd::bas...
Definition basic_string.hpp:1113
basic_string(const basic_string< xtd::char8 > &str) noexcept
Initializes a new instance of xtd::basic_string with specified string to copy.
Definition basic_string.hpp:183
static bool try_parse(const basic_string &str, value_t &value) noexcept
Try to convert a basic_string into a value_t type.
Definition basic_string.hpp:1822
basic_string(input_iterator_t first, input_iterator_t last)
Initializes a new instance of xtd::basic_string with specified first and last iterators of substring.
Definition basic_string.hpp:318
virtual const base_type & get_base_type() const noexcept
Returns the underlying base type.
Definition basic_string.hpp:852
size_type find_first_not_of(const_pointer s, size_type pos) const
Finds the first character equal to none of the characters in the given character sequence....
Definition basic_string.hpp:745
xtd::size last_index_of(const basic_string &value, xtd::size start_index) const
Reports the index of the last occurrence of the specified character in this basic_string....
Definition basic_string.hpp:961
size_type find_last_of(const_pointer s) const
Finds the last character equal to one of characters in the given character sequence....
Definition basic_string.hpp:782
static basic_string full_class_name(const std::type_info &info)
Gets the fully qualified class name of the specified object, including the namespace of the specified...
Definition basic_string.hpp:3078
typename base_type::const_pointer const_pointer
Represents the basic string const pointer type.
Definition basic_string.hpp:91
friend std::basic_istream< char > & operator>>(std::basic_istream< char > &stream, basic_string &str)
Input stream operator. Behaves as a FormattedInputFunction. After constructing and checking the sentr...
Definition basic_string.hpp:3006
basic_string(std::initializer_list< xtd::wchar > il)
Initializes a new instance of xtd::basic_string with specified initializer list.
Definition basic_string.hpp:336
size_type find_last_of(const_pointer s, size_type pos) const
Finds the last character equal to one of characters in the given character sequence....
Definition basic_string.hpp:789
static basic_string join(const basic_string &separator, const collection_t &values) noexcept
Concatenates a specified separator basic_string between each element of a specified object array,...
Definition basic_string.hpp:1701
size_type find_first_not_of(const basic_string &str) const
Finds the first character equal to none of the characters in the given character sequence....
Definition basic_string.hpp:718
static basic_string concat(object_a_t obj_a, object_b_t obj_b, object_c_t obj_c, object_d_t obj_d) noexcept
Concatenates four specified instances of object.
Definition basic_string.hpp:1543
bool starts_with(const basic_string &value) const noexcept
Determines whether the beginning of this instance of xtd::basic_string matches a specified xtd::basic...
Definition basic_string.hpp:1265
virtual bool contains(const basic_string &value) const noexcept
Returns a value indicating whether a specified substring occurs within this basic_string.
Definition basic_string.hpp:576
size_type find_first_of(const basic_string &str, size_type pos) const
Finds the first character equal to one of the characters in the given character sequence....
Definition basic_string.hpp:680
static bool equals(const basic_string &a, const basic_string &b, bool ignore_case) noexcept
Determines whether two specified xtd::basic_string objects have the same value, ignoring or honoring ...
Definition basic_string.hpp:1660
basic_string insert(xtd::size start_index, const basic_string &value) const
Inserts a specified instance of basic_string at a specified index position in this instance.
Definition basic_string.hpp:945
basic_string(const basic_string< xtd::char16 > &str) noexcept
Initializes a new instance of xtd::basic_string with specified string to copy.
Definition basic_string.hpp:171
size_type find_first_of(const_pointer s, size_type pos) const
Finds the first character equal to one of the characters in the given character sequence....
Definition basic_string.hpp:701
basic_string to_upper() const noexcept
Returns a copy of the current xtd::basic_string converted to uppercase.
Definition basic_string.hpp:1390
int32 compare(size_type pos1, size_type count1, const_pointer s, size_type count2) const
Compares two character sequences.
Definition basic_string.hpp:544
basic_string(const std::basic_string< char > &str) noexcept
Initializes a new instance of xtd::basic_string with specified string to copy.
Definition basic_string.hpp:195
typename base_type::traits_type traits_type
Represents the basic string traits type.
Definition basic_string.hpp:75
const base_type & chars() const noexcept
Returns a reference to the underlying base type.
Definition basic_string.hpp:354
basic_string trim_start(value_type trim_char) const noexcept
Removes all leading occurrences of a character specified from the specified xtd::basic_string .
xtd::size last_index_of(const basic_string &value, xtd::size start_index, xtd::size count) const
Reports the index of the last occurrence of the specified character in this basic_string....
Definition basic_string.hpp:968
virtual size_type size() const noexcept
Gets the number of characters in the current xtd::basic_string object.
Definition basic_string.hpp:385
static basic_string join(const basic_string &separator, const collection_t &values, xtd::size index, xtd::size count)
Concatenates a specified separator basic_string between each element of a specified Object array,...
Definition basic_string.hpp:1726
basic_string substring(xtd::size start_index) const
Retrieves a substring from this instance. The substring starts at a specified character position and ...
Definition basic_string.hpp:1311
typename base_type::pointer pointer
Represents the basic string pointer type.
Definition basic_string.hpp:89
xtd::size index_of_any(const xtd::array< value_type > &values) const noexcept
Reports the index of the first occurrence in this instance of any character in a specified array of c...
size_type find_first_not_of(char_t ch) const
Finds the first character equal to none of the characters in the given character sequence....
Definition basic_string.hpp:750
basic_string substr(size_type pos, size_type count) const
Returns a substring [pos, pos + count). If the requested substring extends past the end of the string...
Definition basic_string.hpp:1301
int32 compare_to(const basic_string &value) const noexcept override
Compares this instance with a specified xtd::basic_string object and indicates whether this instance ...
Definition basic_string.hpp:567
xtd::array< value_type > to_char_array() const noexcept
basic_string quoted() const
Allows insertion and extraction of quoted strings, such as the ones found in CSV or XML.
Definition basic_string.hpp:1049
static int32 compare(const basic_string &str_a, xtd::size index_a, const basic_string &str_b, xtd::size index_b, xtd::size length, xtd::string_comparison comparison_type)
Compares substrings of two specified basic_string objects using the specified rules,...
Definition basic_string.hpp:1527
basic_string< char > to_string() const noexcept override
Converts the value of this instance to a xtd::basic_string <char>.
Definition basic_string.hpp:1358
typename base_type::const_reference const_reference
Represents the basic string const referecne type.
Definition basic_string.hpp:87
basic_string(std::initializer_list< xtd::char32 > il)
Initializes a new instance of xtd::basic_string with specified initializer list.
Definition basic_string.hpp:330
static basic_string join(const basic_string &separator, const collection_t &values, xtd::size index)
Concatenates a specified separator basic_string between each element of a specified object array,...
Definition basic_string.hpp:1716
size_type find(const_pointer s) const
Finds the first substring equal to the given character sequence. Search begins at 0,...
Definition basic_string.hpp:650
basic_string< xtd::wchar > to_wstring() const noexcept
Converts the value of this instance to a xtd::basic_string <xtd::wchar>.
Definition basic_string.hpp:1398
basic_string(const std::basic_string< xtd::char16 > &str) noexcept
Initializes a new instance of xtd::basic_string with specified string to copy.
Definition basic_string.hpp:201
basic_string(const xtd::wchar *str, xtd::size count)
Initializes a new instance of xtd::basic_string with specified substring and count characters.
Definition basic_string.hpp:309
basic_string remove(xtd::size start_index) const
Deletes all the characters from this basic_string beginning at a specified position and continuing th...
Definition basic_string.hpp:1070
friend std::basic_ostream< char > & operator<<(std::basic_ostream< char > &stream, const basic_string &str)
Output stream operator. Behaves as a FormattedOutputFunction. After constructing and checking the sen...
Definition basic_string.hpp:2986
size_type find_last_not_of(char_t ch) const
Finds the last character equal to none of the characters in the given character sequence....
Definition basic_string.hpp:838
basic_string remove(xtd::size start_index, xtd::size count) const
Deletes all the characters from this basic_string beginning at a specified position and continuing th...
Definition basic_string.hpp:1075
xtd::size last_index_of(value_type value) const noexcept
Reports the index of the last occurrence of the specified character in this tring.
Definition basic_string.hpp:976
static basic_string class_name()
Gets the class name of the object_t.
Definition basic_string.hpp:3045
static basic_string class_name(const std::type_info &info)
Gets the class name of the specified object.
Definition basic_string.hpp:3058
size_type find_last_not_of(const_pointer s) const
Finds the last character equal to none of the characters in the given character sequence....
Definition basic_string.hpp:826
basic_string trim_start(const xtd::array< value_type > &trim_chars) const noexcept
Removes all leading occurrences of a set of characters specified in an array from the specified xtd::...
basic_string(const basic_string< xtd::wchar > &str) noexcept
Initializes a new instance of xtd::basic_string with specified string to copy.
Definition basic_string.hpp:189
static bool equals(const basic_string &a, const basic_string &b) noexcept
Determines whether two specified xtd::basic_string objects have the same value.
Definition basic_string.hpp:1645
bool is_empty() const noexcept
Name Public Deprecated Methods.
Definition basic_string.hpp:3034
size_type find(value_type ch) const
Finds the first substring equal to the given character sequence. Search begins at 0,...
Definition basic_string.hpp:662
size_type rfind(value_type ch, size_type pos) const
Finds the last substring that is equal to the given character sequence. The search begins at pos and ...
Definition basic_string.hpp:1151
static int32 compare(const basic_string &str_a, const basic_string &str_b, bool ignore_case) noexcept
Compares two specified basic_string objects, ignoring or honoring their case, and returns an integer ...
Definition basic_string.hpp:1475
static int32 compare(const basic_string &str_a, const basic_string &str_b) noexcept
Compares two specified basic_string objects and returns an integer that indicates their relative posi...
Definition basic_string.hpp:1464
typename xtd::collections::generic::ienumerable< char_t >::iterator iterator
Represents the basic string iterator type.
Definition basic_string.hpp:94
typename base_type::const_reverse_iterator const_reverse_iterator
Represents the basic string const reverse iterator type.
Definition basic_string.hpp:101
static basic_string concat(const basic_string &str_a, const basic_string &str_b, const basic_string &str_c) noexcept
Concatenates three specified instances of basic_string.
Definition basic_string.hpp:1549
basic_string(const char *str)
Initializes a new instance of xtd::basic_string with specified string to copy.
Definition basic_string.hpp:245
basic_string quoted(value_type delimiter) const
Allows insertion and extraction of quoted strings, such as the ones found in CSV or XML ith specified...
Definition basic_string.hpp:1054
int32 compare_to(const object &value) const
Compares this instance with a specified xtd::object and indicates whether this instance precedes,...
Definition basic_string.hpp:555
basic_string pad_right(xtd::size total_width, char32 padding_char) const noexcept
Left-aligns the characters in this basic_string, padding with spaces on the right for a specified tot...
Definition basic_string.hpp:1043
int32 compare(size_type pos1, size_type count1, const basic_string &str, size_type pos2, size_type count2) const
Compares two character sequences.
Definition basic_string.hpp:480
basic_string(std::initializer_list< char > il)
Initializes a new instance of xtd::basic_string with specified initializer list.
Definition basic_string.hpp:324
static bool equals(const char_a_t *a, const char_b_t *b, bool ignore_case) noexcept
Determines whether two specified xtd::basic_string objects have the same value, ignoring or honoring ...
Definition basic_string.hpp:1668
static basic_string concat(object_a_t obj_a, object_b_t obj_b, object_c_t obj_c) noexcept
Concatenates three specified instances of object.
Definition basic_string.hpp:1556
basic_string replace(const basic_string &old_string, const basic_string &new_string) const noexcept
Replaces all occurrences of a specified basic_string in this basic_string with another specified basi...
Definition basic_string.hpp:1092
xtd::size get_hash_code() const noexcept override
Returns the hash code for this basic_string.
Definition basic_string.hpp:856
virtual size_type count() const noexcept
Definition basic_string.hpp:362
bool starts_with(value_type value, bool ignore_case) const noexcept
Determines whether the beginning of this instance of xtd::basic_string matches a specified xtd::basic...
Definition basic_string.hpp:1257
typename base_type::size_type size_type
Represents the basic string size type.
Definition basic_string.hpp:81
virtual bool contains(value_type value) const noexcept
Returns a value indicating whether a specified char occurs within this basic_string.
Definition basic_string.hpp:572
size_type find_last_not_of(const basic_string &str) const
Finds the last character equal to none of the characters in the given character sequence....
Definition basic_string.hpp:806
size_type find_first_not_of(const basic_string &str, size_type pos) const
Finds the first character equal to none of the characters in the given character sequence....
Definition basic_string.hpp:724
bool ends_with(value_type value) const noexcept
Determines whether the end of this basic_string matches the specified character.
Definition basic_string.hpp:600
size_type rfind(value_type ch) const
Finds the last substring that is equal to the given character sequence. The search begins at xtd::bas...
Definition basic_string.hpp:1145
static basic_string concat(const basic_string &str_a, const basic_string &str_b, const basic_string &str_c, const basic_string &str_d) noexcept
Concatenates four specified instances of basic_string.
Definition basic_string.hpp:1535
basic_string(xtd::char8 character, xtd::size count)
Initializes a new instance of xtd::basic_string with specified count copies of character.
Definition basic_string.hpp:238
basic_string(const xtd::wchar *str)
Initializes a new instance of xtd::basic_string with specified string to copy.
Definition basic_string.hpp:273
xtd::size last_index_of(value_type value, xtd::size start_index, xtd::size count) const
Reports the index of the last occurrence of the specified character in this basic_string....
Definition basic_string.hpp:990
static constexpr xtd::size epos
Definition basic_string.hpp:149
basic_string & operator=(const basic_string< char > &str) noexcept
Copy assignment operator. Replaces the contents with a copy of the contents of str.
Definition basic_string.hpp:1851
size_type find_first_of(const_pointer s, size_type pos, size_type count) const
Finds the first character equal to one of the characters in the given character sequence....
Definition basic_string.hpp:688
xtd::size index_of(const basic_string &value, xtd::size start_index, xtd::size count) const
Reports the index of the first occurrence of the specified character in this basic_string....
Definition basic_string.hpp:890
const_pointer data() const noexcept
Returns a pointer to the underlying array serving as character storage. The pointer is such that the ...
Definition basic_string.hpp:371
basic_string(basic_string &&)=default
Initializes a new instance of xtd::basic_string with specified string to move.
static constexpr size_type npos
Definition basic_string.hpp:121
static basic_string concat(const basic_string &str_a, const basic_string &str_b) noexcept
Concatenates two specified instances of basic_string.
Definition basic_string.hpp:1561
size_type find(const basic_string &str) const
Finds the first substring equal to the given character sequence. Search begins at 0,...
Definition basic_string.hpp:630
basic_string trim_end() const noexcept
Removes all trailing occurrences of white-space characters from the specified xtd::basic_string.
Definition basic_string.hpp:1423
xtd::size last_index_of_any(const xtd::array< value_type > &values) const noexcept
Reports the index of the last occurrence in this instance of any character in a specified array of ch...
static bool equals(const char_a_t *a, const char_b_t *b) noexcept
Determines whether two specified xtd::basic_string objects have the same value.
Definition basic_string.hpp:1652
static int32 compare(const basic_string &str_a, xtd::size index_a, const basic_string &str_b, xtd::size index_b, xtd::size length)
Compares substrings of two specified basic_string objects and returns an integer that indicates their...
Definition basic_string.hpp:1499
basic_string(const basic_string< char > &str) noexcept
Initializes a new instance of xtd::basic_string with specified string to copy.
Definition basic_string.hpp:165
xtd::size index_of(const basic_string &value) const noexcept
Reports the index of the first occurrence of the specified basic_string in this basic_string.
Definition basic_string.hpp:878
size_type find_first_not_of(char_t ch, size_type pos) const
Finds the first character equal to none of the characters in the given character sequence....
Definition basic_string.hpp:756
basic_string(xtd::char16 character, xtd::size count)
Initializes a new instance of xtd::basic_string with specified count copies of character.
Definition basic_string.hpp:230
int32 compare(const_pointer s) const
Compares two character sequences.
Definition basic_string.hpp:499
bool equals(const object &obj) const noexcept override
Determines whether this instance and a specified object, which must also be a xtd::basic_string objec...
Definition basic_string.hpp:581
size_type find_first_of(char_t ch) const
Finds the first character equal to one of the characters in the given character sequence....
Definition basic_string.hpp:706
size_type find_first_not_of(const_pointer s) const
Finds the first character equal to none of the characters in the given character sequence....
Definition basic_string.hpp:738
size_type find_first_not_of(const_pointer s, size_type pos, size_type count) const
Finds the first character equal to none of the characters in the given character sequence....
Definition basic_string.hpp:732
basic_string substr(size_type pos) const
Returns a substring [pos, pos + count). If the requested substring extends past the end of the string...
Definition basic_string.hpp:1291
basic_string to_title_case() const noexcept
Converts the current basic_string to title case (except for words that are entirely in uppercase,...
basic_string replace(value_type old_char, value_type new_char) const noexcept
Replaces all occurrences of a specified char_t in this basic_string with another specified char_t.
Definition basic_string.hpp:1086
xtd::size index_of_any(const xtd::array< value_type > &values, xtd::size start_index, xtd::size count) const
Reports the index of the first occurrence in this instance of any character in a specified array of c...
bool ends_with(const basic_string &value, bool ignore_case) const noexcept
Determines whether the end of this basic_string instance matches the specified basic_string,...
Definition basic_string.hpp:617
static basic_string concat(const xtd::array< object_t > &args) noexcept
Concatenates the basic_string representations of the elements in a specified object array.
virtual size_type length() const noexcept
Gets the number of characters in the current xtd::basic_string object.
Definition basic_string.hpp:380
static bool is_empty(const xtd::basic_string< value_type, traits_type, allocator_type > &string) noexcept
Indicates whether the specifeid basic_string is an empty basic_string ("").
Definition basic_string.hpp:1692
base_type & chars() noexcept
Returns a reference to the underlying base type.
Definition basic_string.hpp:357
basic_string(const xtd::char16 *str)
Initializes a new instance of xtd::basic_string with specified string to copy.
Definition basic_string.hpp:252
basic_string & operator+=(const basic_string< char > &str)
Addition assignment operator. Appends additional characters to the string.
Definition basic_string.hpp:2138
typename base_type::value_type value_type
Represents the basic string value type.
Definition basic_string.hpp:77
typename base_type::reverse_iterator reverse_iterator
Represents the basic string reverse iterator type.
Definition basic_string.hpp:99
basic_string(const xtd::char16 *str, xtd::size count)
Initializes a new instance of xtd::basic_string with specified substring and count characters.
Definition basic_string.hpp:288
bool equals(const basic_string &value, bool ignore_case) const noexcept
Determines whether this instance and another specified xtd::basic_string object have the same value,...
Definition basic_string.hpp:592
basic_string pad_right(xtd::size total_width) const noexcept
Left-aligns the characters in this basic_string, padding with spaces on the right for a specified tot...
Definition basic_string.hpp:1036
size_type find_last_of(const basic_string &str, size_type pos) const
Finds the last character equal to one of characters in the given character sequence....
Definition basic_string.hpp:768
static basic_string full_class_name()
Definition basic_string.hpp:3065
basic_string(std::initializer_list< xtd::char16 > il)
Initializes a new instance of xtd::basic_string with specified initializer list.
Definition basic_string.hpp:327
basic_string trim_end(value_type trim_char) const noexcept
Removes all trailing occurrences of a character specified from the specified xtd::basic_string .
int32 compare(size_type pos1, size_type count1, const basic_string &str, size_type pos2) const
Compares two character sequences.
Definition basic_string.hpp:455
static basic_string concat(value_t value) noexcept
Creates the basic_string representation of a specified object.
Definition basic_string.hpp:1611
xtd::size last_index_of_any(const xtd::array< value_type > &values, xtd::size start_index, xtd::size count) const
Reports the index of the last occurrence in this instance of any character in a specified array of ch...
basic_string(std::initializer_list< xtd::char8 > il)
Initializes a new instance of xtd::basic_string with specified initializer list.
Definition basic_string.hpp:333
static constexpr xtd::size bpos
Definition basic_string.hpp:131
static basic_string concat(const xtd::array< basic_string > &values) noexcept
Concatenates the elements of a specified basic_string array.
basic_string trim_start() const noexcept
Removes all leading occurrences of white-space characters from the specified xtd::basic_string.
Definition basic_string.hpp:1439
bool ends_with(const basic_string &value) const noexcept
Determines whether the end of this basic_string matches the specified basic_string.
Definition basic_string.hpp:612
size_type find_first_of(const_pointer s) const
Finds the first character equal to one of the characters in the given character sequence....
Definition basic_string.hpp:694
basic_string()=default
Initializes a new instance of xtd::basic_string.
static basic_string full_class_name(const object_t &object)
Gets the fully qualified class name of the specified object, including the namespace of the specified...
Definition basic_string.hpp:3072
xtd::size last_index_of(const basic_string &value) const noexcept
Reports the index of the last occurrence of the specified basic_string in this basic_string.
Definition basic_string.hpp:955
basic_string pad_left(xtd::size total_width, char32 padding_char) const noexcept
Right-aligns the characters in this basic_string, padding with spaces on the left for a specified tot...
Definition basic_string.hpp:1029
bool equals(const basic_string &value) const noexcept override
Determines whether this instance and another specified xtd::basic_string object have the same value.
Definition basic_string.hpp:586
bool starts_with(value_type value) const noexcept
Definition basic_string.hpp:1251
size_type find_last_of(char_t ch) const
Finds the last character equal to one of characters in the given character sequence....
Definition basic_string.hpp:794
basic_string(const xtd::char8 *str)
Initializes a new instance of xtd::basic_string with specified string to copy.
Definition basic_string.hpp:266
size_type rfind(const basic_string &str, size_type pos) const
Finds the last substring that is equal to the given character sequence. The search begins at pos and ...
Definition basic_string.hpp:1119
static int32 compare(const basic_string &str_a, xtd::size index_a, const basic_string &str_b, xtd::size index_b, xtd::size length, bool ignore_case)
Compares substrings of two specified basic_string objects, ignoring or honoring their case,...
Definition basic_string.hpp:1513
basic_string trim(const xtd::array< value_type > &trim_chars) const noexcept
Removes all leading and trailing occurrences of a set of characters specified in an array from the sp...
size_type find_last_not_of(const_pointer s, size_type pos) const
Finds the last character equal to none of the characters in the given character sequence....
Definition basic_string.hpp:833
basic_string< xtd::char8 > to_u8string() const noexcept
Converts the value of this instance to a xtd::basic_string <xtd::char8>.
Definition basic_string.hpp:1383
basic_string(xtd::char32 character, xtd::size count)
Initializes a new instance of xtd::basic_string with specified count copies of character.
Definition basic_string.hpp:234
xtd::size last_index_of_any(const xtd::array< value_type > &values, xtd::size start_index) const
Reports the index of the last occurrence in this instance of any character in a specified array of ch...
size_type find(value_type ch, size_type pos) const
Finds the first substring equal to the given character sequence. Search begins at pos,...
Definition basic_string.hpp:668
size_type find_last_of(const basic_string &str) const
Finds the last character equal to one of characters in the given character sequence....
Definition basic_string.hpp:762
int32 compare(const basic_string &str) const
Compares two character sequences.
Definition basic_string.hpp:409
const_pointer c_str() const noexcept
Returns a pointer to a null-terminated character array with data equivalent to those stored in the st...
Definition basic_string.hpp:350
typename base_type::reference reference
Represents the basic string referecne type.
Definition basic_string.hpp:85
basic_string(const std::basic_string< xtd::wchar > &str) noexcept
Initializes a new instance of xtd::basic_string with specified string to copy.
Definition basic_string.hpp:219
size_type find_last_of(const_pointer s, size_type pos, size_type count) const
Finds the last character equal to one of characters in the given character sequence....
Definition basic_string.hpp:776
typename xtd::collections::generic::ienumerable< char_t >::const_iterator const_iterator
Represents the basic string const iterator type.
Definition basic_string.hpp:97
basic_string substr() const
Returns a substring [pos, pos + count). If the requested substring extends past the end of the string...
Definition basic_string.hpp:1285
typename base_type::difference_type difference_type
Represents the basic string difference type.
Definition basic_string.hpp:83
size_type find_last_not_of(const basic_string &str, size_type pos) const
Finds the last character equal to none of the characters in the given character sequence....
Definition basic_string.hpp:812
size_type find(const basic_string &str, size_type pos) const
Finds the first substring equal to the given character sequence. Search begins at pos,...
Definition basic_string.hpp:636
xtd::size index_of(const basic_string &value, xtd::size start_index) const
Reports the index of the first occurrence of the specified character in this basic_string....
Definition basic_string.hpp:883
basic_string(const std::basic_string< xtd::char32 > &str) noexcept
Initializes a new instance of xtd::basic_string with specified string to copy.
Definition basic_string.hpp:207
friend basic_string operator+(const basic_string &lhs, const basic_string< char > &rhs)
Addition operator. Returns a string containing characters from lhs followed by the characters from rh...
Definition basic_string.hpp:2332
size_type find_first_of(char_t ch, size_type pos) const
Finds the first character equal to one of the characters in the given character sequence....
Definition basic_string.hpp:712
basic_string(const xtd::char32 *str, xtd::size count)
Initializes a new instance of xtd::basic_string with specified substring and count characters.
Definition basic_string.hpp:295
basic_string(const std::basic_string< xtd::char8 > &str) noexcept
Initializes a new instance of xtd::basic_string with specified string to copy.
Definition basic_string.hpp:213
virtual bool empty() const noexcept
Checks whether the container is empty.
Definition basic_string.hpp:375
bool starts_with(const basic_string &value, bool ignore_case) const noexcept
Determines whether the beginning of this instance of xtd::basic_string matches a specified xtd::basic...
Definition basic_string.hpp:1271
basic_string(std::basic_string< char_t > &&str)
Initializes a new instance of xtd::basic_string with specified string to move.
Definition basic_string.hpp:162
basic_string quoted(value_type delimiter, value_type escape) const
Allows insertion and extraction of quoted strings, such as the ones found in CSV or XML ith specified...
Definition basic_string.hpp:1060
basic_string< xtd::char16 > to_u16string() const noexcept
Definition basic_string.hpp:1369
xtd::array< value_type > to_array() const noexcept
Copies the characters in this instance to a Unicode character array.
basic_string< xtd::char32 > to_u32string() const noexcept
Converts the value of this instance to a xtd::basic_string <xtd::char32>.
Definition basic_string.hpp:1376
const_reference operator[](xtd::size index) const
Returns a reference to the character at specified location index.
Definition basic_string.hpp:1839
xtd::size last_index_of(value_type value, xtd::size start_index) const
Reports the index of the last occurrence of the specified character in this basic_string....
Definition basic_string.hpp:982
bool starts_with(const basic_string &value, xtd::string_comparison comparison_type) const noexcept
Determines whether the end of this basic_string matches the specified basic_string when compared usin...
Definition basic_string.hpp:1276
size_type find(const_pointer s, size_type pos, size_type count) const
Finds the first substring equal to the given character sequence. Search begins at pos,...
Definition basic_string.hpp:644
size_type find(const_pointer s, size_type pos) const
Finds the first substring equal to the given character sequence. Search begins at pos,...
Definition basic_string.hpp:657
size_type rfind(const_pointer s, size_type pos) const
Finds the last substring that is equal to the given character sequence. The search begins at pos and ...
Definition basic_string.hpp:1140
auto append(const source_t &element) const noexcept
Appends a value to the end of the sequence.
Definition enumerable.hpp:144
Exposes the enumerator, which supports a simple iteration over a collection of a specified type.
Definition ienumerable.hpp:40
typename xtd::collections::generic::extensions::enumerable_iterators< xtd::any_object, xtd::collections::generic::ienumerable< xtd::any_object > >::const_iterator const_iterator
Definition ienumerable.hpp:50
typename xtd::collections::generic::extensions::enumerable_iterators< xtd::any_object, xtd::collections::generic::ienumerable< xtd::any_object > >::iterator iterator
Definition ienumerable.hpp:48
Supports a simple iteration over a generic collection.
Definition ienumerator.hpp:58
static xtd::size combine(args_t... values) noexcept
Combines values into a hash code.
Definition hash_code.hpp:70
static auto throws(xtd::helpers::exception_case exception_case, const source_location &location=source_location::current()) -> void
Throws an exption with specified exception case.
Defines a generalized comparison method that a value type or class implements to create a type-specif...
Definition icomparable.hpp:22
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:23
object()=default
Create a new instance of the ultimate base class object.
Contains xtd::collections::generic::ienumerable <type_t> interface.
@ argument
The argument is not valid.
Definition exception_case.hpp:31
@ index_out_of_range
The index is out of range.
Definition exception_case.hpp:61
@ argument_out_of_range
The argument is out of range.
Definition exception_case.hpp:35
@ null_pointer
The pointer is null.
Definition exception_case.hpp:79
@ invalid_operation
The operation is not valid.
Definition exception_case.hpp:65
#define self_
The self_ expression is a reference value expression whose value is the reference of the implicit obj...
Definition self.hpp:20
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
char8_t char8
Represents a 8-bit unicode character.
Definition char8.hpp:26
null_ptr null
Represents a null pointer value.
wchar_t wchar
Represents a wide character.
Definition wchar.hpp:24
char16_t char16
Represents a 16-bit unicode character.
Definition char16.hpp:26
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
char32_t char32
Represents a 32-bit unicode character.
Definition char32.hpp:23
string_comparison
Specifies the culture, case, and sort rules to be used by certain overloads of the xtd::string::compa...
Definition string_comparison.hpp:14
string_split_options
Specifies whether applicable xtd::string::split method overloads include or omit empty substrings fro...
Definition string_split_options.hpp:14
ptr< type_t > new_ptr(args_t &&... args)
The xtd::new_ptr operator creates a xtd::ptr object.
Definition new_ptr.hpp:24
value_t parse(const std::string &str)
Convert a string into a type.
Definition parse.hpp:34
@ ordinal
Compare strings using ordinal (binary) sort rules.
Definition string_comparison.hpp:24
@ ordinal_ignore_case
Compare strings using ordinal (binary) sort rules and ignoring the case of the strings being compared...
Definition string_comparison.hpp:26
@ s
The S key.
Definition console_key.hpp:124
@ a
The A key.
Definition console_key.hpp:88
@ c
The C key.
Definition console_key.hpp:92
@ i
The I key.
Definition console_key.hpp:104
@ b
The B key.
Definition console_key.hpp:90
@ separator
The Separator key.
Definition console_key.hpp:172
@ escape
The ESC (ESCAPE) key.
Definition console_key.hpp:34
Contains xtd::hash_code class.
Contains xtd::icomparable interface.
Contains xtd::iequatable interface.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
xtd::size size_type
Represents the read_only_span size type (usually xtd::size).
Definition read_only_span.hpp:62
read_only_span< type_t, count > first() const
Obtains a subspan consisting of the first count elements of the sequence.
Definition read_only_span.hpp:282
read_only_span< type_t, count > last() const
Obtains a subspan consisting of the last N elements of the sequence.
Definition read_only_span.hpp:307
const type_t * const_pointer
Represents the read_only_span const pointer type.
Definition read_only_span.hpp:68
Contains xtd::null pointer valiue.
Contains xtd::object class.
Contains xtd::parse methods.
Contains xtd::string_comparison enum class.
Contains xtd::string_split_options enum class.
Supports a simple iteration over a generic collection.
Definition enumerator.hpp:38
Contains xtd fundamental types.