![]() |
OpenSiv3D
v0.6.5
C++20 framework for creative coding
|
文字列 More...
#include <String.hpp>
Public Types | |
using | string_type = std::u32string |
using | traits_type = typename string_type::traits_type |
using | allocator_type = typename string_type::allocator_type |
using | value_type = typename string_type::value_type |
using | size_type = typename string_type::size_type |
using | difference_type = typename string_type::difference_type |
using | pointer = typename string_type::pointer |
using | const_pointer = typename string_type::const_pointer |
using | reference = typename string_type::reference |
using | const_reference = typename string_type::const_reference |
using | iterator = typename string_type::iterator |
using | const_iterator = typename string_type::const_iterator |
using | reverse_iterator = typename string_type::reverse_iterator |
using | const_reverse_iterator = typename string_type::const_reverse_iterator |
template<class StringViewIsh > | |
using | IsStringViewIsh = std::enable_if_t< std::conjunction_v< std::is_convertible< const StringViewIsh &, StringView >, std::negation< std::is_convertible< const StringViewIsh &, const char32 * > >> > |
Public Member Functions | |
SIV3D_NODISCARD_CXX20 | String () |
デフォルトコンストラクタ | default constructor More... | |
SIV3D_NODISCARD_CXX20 | String (const String &other) |
文字列をコピーして新しい文字列を作成します。 More... | |
SIV3D_NODISCARD_CXX20 | String (const string_type &s) |
文字列をコピーして新しい文字列を作成します。 More... | |
SIV3D_NODISCARD_CXX20 | String (const String &other, size_type pos) |
SIV3D_NODISCARD_CXX20 | String (const String &other, size_type pos, size_type count) |
SIV3D_NODISCARD_CXX20 | String (const value_type *s) |
SIV3D_NODISCARD_CXX20 | String (const value_type *s, size_type count) |
SIV3D_NODISCARD_CXX20 | String (std::initializer_list< value_type > ilist) |
SIV3D_NODISCARD_CXX20 | String (size_t count, value_type ch) |
template<class Iterator > | |
SIV3D_NODISCARD_CXX20 | String (Iterator first, Iterator last) |
SIV3D_NODISCARD_CXX20 | String (String &&other) noexcept |
SIV3D_NODISCARD_CXX20 | String (string_type &&s) noexcept |
template<class StringViewIsh , class = IsStringViewIsh<StringViewIsh>> | |
SIV3D_NODISCARD_CXX20 | String (const StringViewIsh &s) |
operator StringView () const noexcept | |
String & | operator= (const String &other) |
String & | operator= (const string_type &s) |
String & | operator= (String &&other) noexcept |
String & | operator= (string_type &&s) noexcept |
String & | operator= (const value_type *s) |
String & | operator= (std::initializer_list< value_type > ilist) |
template<class StringViewIsh , class = IsStringViewIsh<StringViewIsh>> | |
String & | operator= (const StringViewIsh &s) |
String & | assign (const String &s) |
String & | assign (const string_type &s) |
String & | assign (const value_type *s) |
String & | assign (size_t count, value_type ch) |
String & | assign (String &&s) noexcept |
String & | assign (string_type &&s) noexcept |
String & | assign (std::initializer_list< value_type > ilist) |
template<class StringViewIsh , class = IsStringViewIsh<StringViewIsh>> | |
String & | assign (const StringViewIsh &s) |
template<class Iterator > | |
String & | assign (Iterator first, Iterator last) |
allocator_type | get_allocator () const noexcept |
String & | operator<< (value_type ch) |
String & | operator+= (const String &s) |
String & | operator+= (const string_type &s) |
String & | operator+= (value_type ch) |
String & | operator+= (const value_type *s) |
String & | operator+= (std::initializer_list< value_type > ilist) |
template<class StringViewIsh , class = IsStringViewIsh<StringViewIsh>> | |
String & | operator+= (const StringViewIsh &s) |
String & | append (const String &s) |
String & | append (const string_type &s) |
String & | append (value_type ch) |
String & | append (const value_type *s) |
String & | append (const value_type *s, size_t count) |
String & | append (std::initializer_list< value_type > ilist) |
String & | append (size_t count, value_type ch) |
template<class StringViewIsh , class = IsStringViewIsh<StringViewIsh>> | |
String & | append (const StringViewIsh &s) |
template<class Iterator > | |
String & | append (Iterator first, Iterator last) |
String & | insert (size_t offset, const String &s) |
String & | insert (size_t offset, std::initializer_list< value_type > ilist) |
String & | insert (size_t offset, const value_type *s) |
template<class StringViewIsh , class = IsStringViewIsh<StringViewIsh>> | |
String & | insert (size_t offset, const StringViewIsh &s) |
String & | insert (size_t offset, size_t count, value_type ch) |
iterator | insert (const_iterator where, value_type ch) |
iterator | insert (const_iterator where, size_t count, value_type ch) |
template<class Iterator > | |
iterator | insert (const_iterator where, Iterator first, Iterator last) |
template<class Iterator > | |
String & | insert (const_iterator first1, const_iterator last1, Iterator first2, Iterator last2) |
String & | erase (size_t offset=0, size_t count=npos) |
iterator | erase (const_iterator where) noexcept |
iterator | erase (const_iterator first, const_iterator last) noexcept |
void | clear () noexcept |
格納している文字列を消去し、空の文字列にします。 More... | |
iterator | begin () noexcept |
iterator | end () noexcept |
const_iterator | begin () const noexcept |
const_iterator | end () const noexcept |
const_iterator | cbegin () const noexcept |
const_iterator | cend () const noexcept |
reverse_iterator | rbegin () noexcept |
reverse_iterator | rend () noexcept |
const_reverse_iterator | rbegin () const noexcept |
const_reverse_iterator | rend () const noexcept |
const_reverse_iterator | crbegin () const noexcept |
const_reverse_iterator | crend () const noexcept |
void | shrink_to_fit () |
void | release () |
value_type & | at (size_t offset) & |
const value_type & | at (size_t offset) const & |
value_type | at (size_t offset) && |
value_type & | operator[] (size_t offset) &noexcept |
const value_type & | operator[] (size_t offset) const &noexcept |
value_type | operator[] (size_t offset) &&noexcept |
void | push_front (value_type ch) |
先頭に文字を追加します。 More... | |
void | push_back (value_type ch) |
末尾に文字を追加します。 More... | |
void | pop_front () |
先頭の文字を削除します。 More... | |
void | pop_front_N (size_t n) |
先頭の n 文字を削除します。 More... | |
void | pop_back () noexcept |
末尾の文字を削除します。 More... | |
void | pop_back_N (size_t n) noexcept |
末尾の n 文字を削除します。 More... | |
value_type & | front () noexcept |
先頭の文字への参照を返します。 More... | |
const value_type & | front () const noexcept |
先頭の文字への参照を返します。 More... | |
value_type & | back () noexcept |
末尾の文字への参照を返します。 More... | |
const value_type & | back () const noexcept |
末尾の文字への参照を返します。 More... | |
const value_type * | c_str () const noexcept |
const value_type * | data () const noexcept |
value_type * | data () noexcept |
string_type & | str () noexcept |
const string_type & | str () const noexcept |
size_t | length () const noexcept |
文字列の長さ(要素数)を返します。 More... | |
size_t | size () const noexcept |
文字列の長さ(要素数)を返します。 More... | |
size_t | size_bytes () const noexcept |
文字列のデータサイズ(バイト)を返します。 More... | |
bool | empty () const noexcept |
文字列が空であるかを返します。 More... | |
bool | isEmpty () const noexcept |
文字列が空であるかを返します。 More... | |
operator bool () const noexcept | |
文字列が空でないかを返します。 More... | |
size_t | max_size () const noexcept |
size_t | capacity () const noexcept |
void | resize (size_t newSize) |
void | resize (size_t newSize, value_type ch) |
void | reserve (size_t newCapacity) |
void | swap (String &other) noexcept |
bool | starts_with (value_type ch) const noexcept |
文字列が指定した文字から始まるかを返します。 More... | |
bool | starts_with (StringView s) const |
文字列が指定した文字列から始まるかを返します。 More... | |
bool | ends_with (value_type ch) const noexcept |
文字列が指定した文字で終わるかを返します。 More... | |
bool | ends_with (StringView s) const |
文字列が指定した文字列で終わるかを返します。 More... | |
String | substr (size_t offset=0, size_t count=npos) const |
部分文字列を取得します。 More... | |
StringView | substrView (size_t offset=0, size_t count=npos) const & |
部分文字列へのビューを取得します。 More... | |
StringView | substrView (size_t offset=0, size_t count=npos) &&=delete |
std::string | narrow () const |
文字列を std::string に変換します。 More... | |
std::wstring | toWstr () const |
文字列を std::wstring に変換します。 More... | |
std::string | toUTF8 () const |
文字列を UTF-8 文字列に変換します。 More... | |
std::u16string | toUTF16 () const |
文字列を UTF-16 文字列に変換します。 More... | |
const std::u32string & | toUTF32 () const noexcept |
文字列を UTF-32 文字列に変換します。 More... | |
uint64 | hash () const noexcept |
文字列のハッシュを返します。 More... | |
size_t | indexOf (StringView s, size_t offset=0) const noexcept |
文字列を指定した位置から検索し、最初に現れた位置を返します。 More... | |
size_t | indexOf (value_type ch, size_t offset=0) const noexcept |
文字を指定した位置から検索し、最初に現れた位置を返します。 More... | |
size_t | indexOfNot (value_type ch, size_t offset=0) const noexcept |
文字を指定した位置から検索し、最初にそれとは異なる文字が現れた位置を返します。 More... | |
size_t | lastIndexOf (StringView s, size_t offset=npos) const noexcept |
文字列を後方から逆順に検索し、最初に現れた位置を返します。 More... | |
size_t | lastIndexOf (value_type ch, size_t offset=npos) const noexcept |
文字を後方から逆順に検索し、最初に現れた位置を返します。 More... | |
size_t | lastIndexNotOf (value_type ch, size_t offset=npos) const noexcept |
文字を後方から逆順に検索し、最初にそれとは異なる文字が現れた位置を返します。 More... | |
size_t | indexOfAny (StringView anyof, size_t offset=0) const noexcept |
検索する文字のいずれかが最初に現れた位置を返します。 More... | |
size_t | lastIndexOfAny (StringView anyof, size_t offset=npos) const noexcept |
文字を後方から逆順に検索し、検索する文字のいずれかが最初に現れた位置を返します。 More... | |
size_t | indexNotOfAny (StringView anyof, size_t offset=0) const |
検索する文字に含まれない文字が最初に現れた位置を返します。 More... | |
size_t | lastIndexNotOfAny (StringView anyof, size_t offset=npos) const |
文字を後方から逆順に検索し、検索する文字に含まれない文字が最初に現れた位置を返します。 More... | |
int32 | compare (const String &s) const noexcept |
文字列の大小を比較します。 More... | |
int32 | compare (StringView s) const noexcept |
文字列の大小を比較します。 More... | |
int32 | compare (const value_type *s) const noexcept |
文字列の大小を比較します。 More... | |
int32 | case_insensitive_compare (StringView s) const noexcept |
英字の大小を無視して文字列の大小を比較します。 More... | |
bool | case_insensitive_equals (StringView s) const noexcept |
英字の大小を無視して文字列を比較します。 More... | |
template<class Fty = decltype(Identity), std::enable_if_t< std::is_invocable_r_v< bool, Fty, char32 >> * = nullptr> | |
bool | all (Fty f=Identity) const |
全ての要素が条件を満たすかを返します。 More... | |
template<class Fty = decltype(Identity), std::enable_if_t< std::is_invocable_r_v< bool, Fty, char32 >> * = nullptr> | |
bool | any (Fty f=Identity) const |
条件を満たす要素があるかを返します。 More... | |
String & | capitalize () noexcept |
最初に登場する英字を大文字にします。 More... | |
String | capitalized () const & |
最初に登場する英字を大文字にした文字列を返します。 More... | |
String | capitalized () && |
最初に登場する英字を大文字にした文字列を返します。 More... | |
size_t | count (value_type ch) const noexcept |
指定した値と等しい要素の個数を返します。 More... | |
size_t | count (StringView s) const |
指定した文字列の個数を数えます。 More... | |
template<class Fty , std::enable_if_t< std::is_invocable_r_v< bool, Fty, char32 >> * = nullptr> | |
size_t | count_if (Fty f) const |
条件を満たす要素の個数を返します。 More... | |
template<class Fty , std::enable_if_t< std::is_invocable_v< Fty, char32 & >> * = nullptr> | |
String & | each (Fty f) |
全ての要素を順番に引数にして関数を呼び出します。 More... | |
template<class Fty , std::enable_if_t< std::is_invocable_v< Fty, char32 >> * = nullptr> | |
const String & | each (Fty f) const |
全ての要素を順番に引数にして関数を呼び出します。 More... | |
template<class Fty , std::enable_if_t< std::is_invocable_v< Fty, size_t, char32 & >> * = nullptr> | |
String & | each_index (Fty f) |
全ての要素とそのインデックスを順番に引数にして関数を呼び出します。 More... | |
template<class Fty , std::enable_if_t< std::is_invocable_v< Fty, size_t, char32 >> * = nullptr> | |
const String & | each_index (Fty f) const |
全ての要素とそのインデックスを順番に引数にして関数を呼び出します。 More... | |
String | expandTabs (size_t tabSize=4) const |
タブ文字を半角空白に置換した文字列を返します。 More... | |
value_type | fetch (size_t index, value_type defaultValue) const noexcept |
指定したインデックスにある要素を返します。インデックスが範囲外の場合デフォルト値を返します。 More... | |
String & | fill (value_type value) |
指定した値を全ての要素に代入します。 More... | |
template<class Fty , std::enable_if_t< std::is_invocable_r_v< bool, Fty, char32 >> * = nullptr> | |
String | filter (Fty f) const |
指定した条件を満たす要素だけを集めた新しい文字列を返します。 More... | |
bool | includes (value_type ch) const |
指定した値と等しい要素があるかを返します。 More... | |
bool | includes (StringView s) const |
指定した文字列を含むかを返します。 More... | |
template<class Fty , std::enable_if_t< std::is_invocable_r_v< bool, Fty, char32 >> * = nullptr> | |
bool | includes_if (Fty f) const |
指定した条件を満たす要素があるかを返します。 More... | |
template<class Fty , std::enable_if_t< std::is_invocable_r_v< bool, Fty, char32 >> * = nullptr> | |
String & | keep_if (Fty f) |
指定した条件を満たす要素のみを残して、それ以外を文字列から削除します。 More... | |
String | layout (size_t width) const |
指定した 1 行の文字数で改行するようにした新しい文字列を返します。 More... | |
size_t | levenshteinDistanceFrom (StringView other) const noexcept |
別の文字列とのレーベンシュタイン距離を計算して返します。 More... | |
String & | lowercase () noexcept |
英字をすべて小文字にします。 More... | |
String | lowercased () const & |
英字をすべて小文字にした新しい文字列を返します。 More... | |
String | lowercased () && |
英字をすべて小文字にした新しい文字列を返します。 More... | |
String & | lpad (size_t length, value_type fillChar=U' ') |
文字列の左を埋め文字で埋めます。 More... | |
String | lpadded (size_t length, value_type fillChar=U' ') const & |
文字列の左を埋め文字で埋めた新しい文字列を返します。 More... | |
String | lpadded (size_t length, value_type fillChar=U' ') && |
文字列の左を埋め文字で埋めた新しい文字列を返します。 More... | |
String & | ltrim () |
文字列の先頭にある空白文字を削除します。 More... | |
String | ltrimmed () const & |
文字列の先頭にある空白文字を削除した新しい文字列を返します。 More... | |
String | ltrimmed () && |
文字列の先頭にある空白文字を削除した新しい文字列を返します。 More... | |
template<class Fty , std::enable_if_t< std::is_invocable_v< Fty, char32 >> * = nullptr> | |
auto | map (Fty f) const |
文字列の各要素に関数を適用した戻り値からなる配列を返します。 More... | |
template<class Fty = decltype(Identity), std::enable_if_t< std::is_invocable_r_v< bool, Fty, char32 >> * = nullptr> | |
bool | none (Fty f=Identity) const |
条件を満たす要素が存在しないかを返します。 More... | |
String & | remove (value_type ch) |
指定した文字を文字列から削除します。 More... | |
String & | remove (StringView s) |
指定した文字列をもとの文字列から削除します。 More... | |
String | removed (value_type ch) const & |
指定した文字を除去した新しい文字列を返します。 More... | |
String | removed (value_type ch) && |
指定した文字を除去した新しい文字列を返します。 More... | |
String | removed (StringView s) const |
指定した文字列を除去した新しい文字列を返します。 More... | |
String & | remove_at (size_t index) |
指定したインデックスにある要素を文字列から削除します。 More... | |
String | removed_at (size_t index) const & |
定したインデックスにある要素を削除した新しい文字列を返します。 More... | |
String | removed_at (size_t index) && |
定したインデックスにある要素を削除した新しい文字列を返します。 More... | |
template<class Fty , std::enable_if_t< std::is_invocable_r_v< bool, Fty, char32 >> * = nullptr> | |
String & | remove_if (Fty f) |
指定した条件を満たす文字を削除します。 More... | |
template<class Fty , std::enable_if_t< std::is_invocable_r_v< bool, Fty, char32 >> * = nullptr> | |
String | removed_if (Fty f) const & |
指定した条件を満たす文字を削除した新しい文字列を返します。 More... | |
template<class Fty , std::enable_if_t< std::is_invocable_r_v< bool, Fty, char32 >> * = nullptr> | |
String | removed_if (Fty f) && |
指定した条件を満たす文字を削除した新しい文字列を返します。 More... | |
String & | replace (value_type oldChar, value_type newChar) |
指定した文字を置換します。 More... | |
String & | replace (const StringView oldStr, const StringView newStr) |
指定した文字列を置換します。 More... | |
String & | replace (size_type pos, size_type count, const String &s) |
String & | replace (size_type pos, size_type count, const value_type *s) |
template<class StringViewIsh , class = IsStringViewIsh<StringViewIsh>> | |
String & | replace (size_type pos, size_type count, const StringViewIsh &s) |
String & | replace (const_iterator first, const_iterator last, const String &s) |
String & | replace (const_iterator first, const_iterator last, const value_type *s) |
template<class StringViewIsh , class = IsStringViewIsh<StringViewIsh>> | |
String & | replace (const_iterator first, const_iterator last, const StringViewIsh &s) |
template<class Iterator > | |
String & | replace (const_iterator first, const_iterator last, Iterator first2, Iterator last2) |
String | replaced (value_type oldChar, value_type newChar) const & |
指定した文字を置換した新しい文字列を返します。 More... | |
String | replaced (value_type oldChar, value_type newChar) && |
指定した文字を置換した新しい文字列を返します。 More... | |
String | replaced (StringView oldStr, StringView newStr) const |
指定した文字列を置換した新しい文字列を返します。 More... | |
template<class Fty , std::enable_if_t< std::is_invocable_r_v< bool, Fty, char32 >> * = nullptr> | |
String & | replace_if (Fty f, const value_type newChar) |
指定した条件を満たす文字を別の文字に置き換えます。 More... | |
template<class Fty , std::enable_if_t< std::is_invocable_r_v< bool, Fty, char32 >> * = nullptr> | |
String | replaced_if (Fty f, const value_type newChar) const & |
指定した条件を満たす文字を別の文字に置き換えた新しい文字列を返します。 More... | |
template<class Fty , std::enable_if_t< std::is_invocable_r_v< bool, Fty, char32 >> * = nullptr> | |
String | replaced_if (Fty f, const value_type newChar) && |
指定した条件を満たす文字を別の文字に置き換えた新しい文字列を返します。 More... | |
String & | reverse () |
文字列を反転します。 More... | |
String | reversed () const & |
反転した文字列を返します。 More... | |
String | reversed () && |
反転した文字列を返します。 More... | |
template<class Fty , std::enable_if_t< std::is_invocable_v< Fty, char32 & >> * = nullptr> | |
String & | reverse_each (Fty f) |
文字列の各文字への参照を引数に、末尾の文字から順に関数を呼び出します。 More... | |
template<class Fty , std::enable_if_t< std::is_invocable_v< Fty, char32 >> * = nullptr> | |
const String & | reverse_each (Fty f) const |
文字列の各文字への参照を引数に、末尾の文字から順に関数を呼び出します。 More... | |
String & | rotate (std::ptrdiff_t count=1) |
文字列の各文字の位置をシフトさせ、はみ出た文字は反対側に挿入します。 More... | |
String | rotated (std::ptrdiff_t count=1) const & |
文字列の各文字の位置をシフトさせ、はみ出た文字を反対側に挿入した新しい文字列を返します。 More... | |
String | rotated (std::ptrdiff_t count=1) && |
文字列の各文字の位置をシフトさせ、はみ出た文字を反対側に挿入した新しい文字列を返します。 More... | |
String & | rpad (size_t length, value_type fillChar=U' ') |
文字列の右を埋め文字で埋めます。 More... | |
String | rpadded (size_t length, value_type fillChar=U' ') const & |
文字列を指定された文字で右詰めした新しい文字列を返します。 More... | |
String | rpadded (size_t length, value_type fillChar=U' ') && |
文字列を指定された文字で右詰めした新しい文字列を返します。 More... | |
String & | rtrim () |
文字列の末尾にある空白文字を削除します。 More... | |
String | rtrimmed () const & |
文字列の末尾にある空白文字を削除した新しい文字列を返します。 More... | |
String | rtrimmed () && |
文字列の末尾にある空白文字を削除した新しい文字列を返します。 More... | |
String & | shuffle () |
文字列をランダムに並び替えます。 More... | |
SIV3D_CONCEPT_URBG String & | shuffle (URBG &&rbg) |
指定された乱数生成器を使って文字列をランダムに並び替えます。 More... | |
String | shuffled () const & |
ランダムに並び替えた新しい文字列を返します。 More... | |
String | shuffled () && |
ランダムに並び替えた新しい文字列を返します。 More... | |
SIV3D_CONCEPT_URBG String | shuffled (URBG &&rbg) const & |
指定された乱数生成器を使ってランダムに並び替えた新しい文字列を返します。 More... | |
SIV3D_CONCEPT_URBG String | shuffled (URBG &&rbg) && |
指定された乱数生成器を使ってランダムに並び替えた新しい文字列を返します。 More... | |
Array< String, std::allocator< String > > | split (value_type ch) const |
指定した区切り文字で文字列を分割します。 More... | |
std::pair< String, String > | split_at (size_t pos) const |
Array< String, std::allocator< String > > | split_lines () const |
String & | swapcase () noexcept |
英字の大文字と小文字を入れ替えます。 More... | |
String | swapcased () const & |
英字の大文字と小文字を入れ替えた文字列を返します。 More... | |
String | swapcased () && |
英字の大文字と小文字を入れ替えた文字列を返します。 More... | |
String & | trim () |
文字列の先頭と末尾にある空白文字を削除します。 More... | |
String | trimmed () const & |
文字列の先頭と末尾にある空白文字を削除した新しい文字列を返します。 More... | |
String | trimmed () && |
文字列の先頭と末尾にある空白文字を削除した新しい文字列を返します。 More... | |
String & | uppercase () noexcept |
英字をすべて大文字にします。 More... | |
String | uppercased () const & |
英字をすべて大文字にした文字列を返します。 More... | |
String | uppercased () && |
英字をすべて大文字にした文字列を返します。 More... | |
String & | rsort () noexcept |
String | rsorted () const & |
String | rsorted () && |
String & | sort () noexcept |
文字列をソートします。 More... | |
template<class Fty , std::enable_if_t< std::is_invocable_r_v< bool, Fty, char32, char32 >> * = nullptr> | |
String & | sort_by (Fty f) |
文字列を指定された比較関数でソートします。 More... | |
String | sorted () const & |
文字列をソートした新しい文字列を返します。 More... | |
String | sorted () && |
文字列をソートした新しい文字列を返します。 More... | |
template<class Fty , std::enable_if_t< std::is_invocable_r_v< bool, Fty, char32, char32 >> * = nullptr> | |
String | sorted_by (Fty f) const & |
文字列を指定された比較関数でソートした新しい文字列を返します。 More... | |
template<class Fty , std::enable_if_t< std::is_invocable_r_v< bool, Fty, char32, char32 >> * = nullptr> | |
String | sorted_by (Fty f) && |
文字列を指定された比較関数でソートした新しい文字列を返します。 More... | |
String | take (size_t n) const |
文字列の先頭から指定された文字数分取り出した新しい文字列を返します。 More... | |
template<class Fty , std::enable_if_t< std::is_invocable_r_v< bool, Fty, char32 >> * = nullptr> | |
String | take_while (Fty f) const |
文字列の先頭から、指定された条件を満たす連続した文字を取り出した新しい文字列を返します。 More... | |
String & | stable_unique () |
文字列をソートせずに、重複する文字を削除します。 More... | |
String | stable_uniqued () const |
文字列をソートせずに、重複する文字を削除した新しい文字列を返します。 More... | |
String & | sort_and_unique () |
文字列をソートし、重複する文字を削除します。 More... | |
String | sorted_and_uniqued () const & |
文字列をソートし、重複する文字を削除した新しい文字列を返します。 More... | |
String | sorted_and_uniqued () && |
文字列をソートし、重複する文字を削除した新しい文字列を返します。 More... | |
String & | unique_consecutive () |
同じ文字が連続する場合、その先頭以外を除去します。 More... | |
String | uniqued_consecutive () const & |
同じ文字が連続する場合、その先頭以外を除去した新しい文字列を返します。 More... | |
String | uniqued_consecutive () && |
同じ文字が連続する場合、その先頭以外を除去した新しい文字列を返します。 More... | |
String | values_at (std::initializer_list< size_t > indices) const |
複数のインデックスを取り、それらの文字からなる新しい文字列を返します。 More... | |
String & | xml_escape () |
文字列に XML エスケープを行います。 More... | |
String | xml_escaped () const |
XML エスケープした文字列を返します。 More... | |
Static Public Attributes | |
static constexpr size_type | npos { static_cast<size_type>(-1) } |
Friends | |
bool | operator== (const String &lhs, const value_type *rhs) |
bool | operator== (const String &lhs, const String &rhs) noexcept |
bool | operator== (const value_type *lhs, const String &rhs) |
bool | operator!= (const String &lhs, const String &rhs) noexcept |
bool | operator!= (const value_type *lhs, const String &rhs) |
bool | operator!= (const String &lhs, const value_type *rhs) |
bool | operator< (const String &lhs, const String &rhs) noexcept |
bool | operator< (const value_type *lhs, const String &rhs) |
bool | operator< (const String &lhs, const value_type *rhs) |
bool | operator> (const String &lhs, const String &rhs) noexcept |
bool | operator> (const value_type *lhs, const String &rhs) |
bool | operator> (const String &lhs, const value_type *rhs) |
bool | operator<= (const String &lhs, const String &rhs) noexcept |
bool | operator<= (const value_type *lhs, const String &rhs) |
bool | operator<= (const String &lhs, const value_type *rhs) |
bool | operator>= (const String &lhs, const String &rhs) noexcept |
bool | operator>= (const value_type *lhs, const String &rhs) |
bool | operator>= (const String &lhs, const value_type *rhs) |
String | operator+ (const value_type lhs, const String &rhs) |
String | operator+ (const value_type lhs, String &&rhs) |
String | operator+ (const value_type *lhs, const String &rhs) |
String | operator+ (const value_type *lhs, String &&rhs) |
String | operator+ (StringView lhs, const String &rhs) |
String | operator+ (StringView lhs, String &&rhs) |
String | operator+ (const String &lhs, const value_type rhs) |
String | operator+ (const String &lhs, const value_type *rhs) |
String | operator+ (const String &lhs, StringView rhs) |
String | operator+ (const String &lhs, const String &rhs) |
String | operator+ (const String &lhs, String &&rhs) |
String | operator+ (String &&lhs, const value_type rhs) |
String | operator+ (String &&lhs, const value_type *rhs) |
String | operator+ (String &&lhs, StringView rhs) |
String | operator+ (String &&lhs, const String &rhs) |
String | operator+ (String &&lhs, String &&rhs) |
std::ostream & | operator<< (std::ostream &output, const String &value) |
std::wostream & | operator<< (std::wostream &output, const String &value) |
std::basic_ostream< char32 > & | operator<< (std::basic_ostream< char32 > &output, const String &value) |
std::istream & | operator>> (std::istream &input, String &value) |
std::wistream & | operator>> (std::wistream &input, String &value) |
void | Formatter (FormatData &formatData, const String &s) |
文字列
using s3d::String::allocator_type = typename string_type::allocator_type |
using s3d::String::const_iterator = typename string_type::const_iterator |
using s3d::String::const_pointer = typename string_type::const_pointer |
using s3d::String::const_reference = typename string_type::const_reference |
using s3d::String::const_reverse_iterator = typename string_type::const_reverse_iterator |
using s3d::String::difference_type = typename string_type::difference_type |
using s3d::String::IsStringViewIsh = std::enable_if_t< std::conjunction_v<std::is_convertible<const StringViewIsh&, StringView>, std::negation<std::is_convertible<const StringViewIsh&, const char32*> >> > |
using s3d::String::iterator = typename string_type::iterator |
using s3d::String::pointer = typename string_type::pointer |
using s3d::String::reference = typename string_type::reference |
using s3d::String::reverse_iterator = typename string_type::reverse_iterator |
using s3d::String::size_type = typename string_type::size_type |
using s3d::String::string_type = std::u32string |
using s3d::String::traits_type = typename string_type::traits_type |
using s3d::String::value_type = typename string_type::value_type |
SIV3D_NODISCARD_CXX20 s3d::String::String | ( | ) |
デフォルトコンストラクタ | default constructor
SIV3D_NODISCARD_CXX20 s3d::String::String | ( | const String & | other | ) |
文字列をコピーして新しい文字列を作成します。
other | コピーする文字列 |
SIV3D_NODISCARD_CXX20 s3d::String::String | ( | const string_type & | s | ) |
文字列をコピーして新しい文字列を作成します。
s | コピーする文字列 |
SIV3D_NODISCARD_CXX20 s3d::String::String | ( | const value_type * | s | ) |
SIV3D_NODISCARD_CXX20 s3d::String::String | ( | const value_type * | s, |
size_type | count | ||
) |
SIV3D_NODISCARD_CXX20 s3d::String::String | ( | std::initializer_list< value_type > | ilist | ) |
SIV3D_NODISCARD_CXX20 s3d::String::String | ( | size_t | count, |
value_type | ch | ||
) |
SIV3D_NODISCARD_CXX20 s3d::String::String | ( | Iterator | first, |
Iterator | last | ||
) |
|
noexcept |
|
noexcept |
|
explicit |
bool s3d::String::all | ( | Fty | f = Identity | ) | const |
全ての要素が条件を満たすかを返します。
Fty | 条件を記述した関数の型 |
f | 条件を記述した関数 |
bool s3d::String::any | ( | Fty | f = Identity | ) | const |
条件を満たす要素があるかを返します。
Fty | 条件を記述した関数の型 |
f | 条件を記述した関数 |
String& s3d::String::append | ( | const string_type & | s | ) |
String& s3d::String::append | ( | const StringViewIsh & | s | ) |
String& s3d::String::append | ( | const value_type * | s | ) |
String& s3d::String::append | ( | const value_type * | s, |
size_t | count | ||
) |
String& s3d::String::append | ( | Iterator | first, |
Iterator | last | ||
) |
String& s3d::String::append | ( | size_t | count, |
value_type | ch | ||
) |
String& s3d::String::append | ( | std::initializer_list< value_type > | ilist | ) |
String& s3d::String::append | ( | value_type | ch | ) |
String& s3d::String::assign | ( | const string_type & | s | ) |
String& s3d::String::assign | ( | const StringViewIsh & | s | ) |
String& s3d::String::assign | ( | const value_type * | s | ) |
String& s3d::String::assign | ( | Iterator | first, |
Iterator | last | ||
) |
String& s3d::String::assign | ( | size_t | count, |
value_type | ch | ||
) |
String& s3d::String::assign | ( | std::initializer_list< value_type > | ilist | ) |
|
noexcept |
value_type& s3d::String::at | ( | size_t | offset | ) | & |
value_type s3d::String::at | ( | size_t | offset | ) | && |
const value_type& s3d::String::at | ( | size_t | offset | ) | const & |
|
noexcept |
末尾の文字への参照を返します。
|
noexcept |
末尾の文字への参照を返します。
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
最初に登場する英字を大文字にします。
String s3d::String::capitalized | ( | ) | && |
最初に登場する英字を大文字にした文字列を返します。
String s3d::String::capitalized | ( | ) | const & |
最初に登場する英字を大文字にした文字列を返します。
|
noexcept |
英字の大小を無視して文字列の大小を比較します。
s | 比較対象の文字列 |
|
noexcept |
英字の大小を無視して文字列を比較します。
s | 比較対象の文字列 |
|
noexcept |
|
noexcept |
|
noexcept |
格納している文字列を消去し、空の文字列にします。
文字列の大小を比較します。
s | 比較対象の文字列 |
|
noexcept |
文字列の大小を比較します。
s | 比較対象の文字列 |
|
noexcept |
文字列の大小を比較します。
s | 比較対象の文字列 |
size_t s3d::String::count | ( | StringView | s | ) | const |
指定した文字列の個数を数えます。
s | 検索する文字列 |
"aaa"
から "aa"
を検索する場合の結果は 2 です。
|
noexcept |
指定した値と等しい要素の個数を返します。
ch | 検索する値 |
size_t s3d::String::count_if | ( | Fty | f | ) | const |
条件を満たす要素の個数を返します。
Fty | 条件を記述した関数の型 |
f | 条件を記述した関数 |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
String& s3d::String::each | ( | Fty | f | ) |
全ての要素を順番に引数にして関数を呼び出します。
Fty | 呼び出す関数の型 |
f | 呼び出す関数 |
for (auto& ch : s) f(ch);
と同じです。 const String& s3d::String::each | ( | Fty | f | ) | const |
全ての要素を順番に引数にして関数を呼び出します。
Fty | 呼び出す関数の型 |
f | 呼び出す関数 |
for (const auto& ch : s) f(ch);
と同じです。 String& s3d::String::each_index | ( | Fty | f | ) |
全ての要素とそのインデックスを順番に引数にして関数を呼び出します。
Fty | 呼び出す関数の型 |
f | 呼び出す関数 |
for (size_t i = 0; auto& ch : s) f(i++, ch);
と同じです。 const String& s3d::String::each_index | ( | Fty | f | ) | const |
全ての要素とそのインデックスを順番に引数にして関数を呼び出します。
Fty | 呼び出す関数の型 |
f | 呼び出す関数 |
for (size_t i = 0; const auto& ch : s) f(i++, ch);
と同じです。
|
noexcept |
文字列が空であるかを返します。
|
noexcept |
|
noexcept |
bool s3d::String::ends_with | ( | StringView | s | ) | const |
文字列が指定した文字列で終わるかを返します。
s | 検索する文字列 |
|
noexcept |
文字列が指定した文字で終わるかを返します。
ch | 検索する文字 |
|
noexcept |
|
noexcept |
String s3d::String::expandTabs | ( | size_t | tabSize = 4 | ) | const |
タブ文字を半角空白に置換した文字列を返します。
tabSize | タブ置換後の半角空白の数 |
|
noexcept |
指定したインデックスにある要素を返します。インデックスが範囲外の場合デフォルト値を返します。
index | インデックス |
defaultValue | インデックスが範囲外の場合に返すデフォルト値 |
String& s3d::String::fill | ( | value_type | value | ) |
指定した値を全ての要素に代入します。
value | 代入する値 |
String s3d::String::filter | ( | Fty | f | ) | const |
指定した条件を満たす要素だけを集めた新しい文字列を返します。
Fty | 条件を記述した関数の型 |
f | 条件を記述した関数 |
|
noexcept |
先頭の文字への参照を返します。
|
noexcept |
先頭の文字への参照を返します。
|
noexcept |
|
noexcept |
文字列のハッシュを返します。
bool s3d::String::includes | ( | StringView | s | ) | const |
指定した文字列を含むかを返します。
ch | 検索する文字列 |
bool s3d::String::includes | ( | value_type | ch | ) | const |
指定した値と等しい要素があるかを返します。
value | 検索する値 |
bool s3d::String::includes_if | ( | Fty | f | ) | const |
指定した条件を満たす要素があるかを返します。
Fty | 条件を記述した関数の型 |
f | 条件を記述した関数 |
.any(f)
と同じです。 size_t s3d::String::indexNotOfAny | ( | StringView | anyof, |
size_t | offset = 0 |
||
) | const |
検索する文字に含まれない文字が最初に現れた位置を返します。
anyof | 検索する文字の集合 |
offset | 検索を開始する位置 |
|
noexcept |
文字列を指定した位置から検索し、最初に現れた位置を返します。
s | 検索する文字列 |
offset | 検索を開始する位置 |
|
noexcept |
文字を指定した位置から検索し、最初に現れた位置を返します。
ch | 検索する文字 |
offset | 検索を開始する位置 |
|
noexcept |
検索する文字のいずれかが最初に現れた位置を返します。
anyof | 検索する文字の集合 |
offset | 検索を開始する位置 |
|
noexcept |
文字を指定した位置から検索し、最初にそれとは異なる文字が現れた位置を返します。
ch | 検索する文字 |
offset | 検索を開始する位置 |
String& s3d::String::insert | ( | const_iterator | first1, |
const_iterator | last1, | ||
Iterator | first2, | ||
Iterator | last2 | ||
) |
iterator s3d::String::insert | ( | const_iterator | where, |
Iterator | first, | ||
Iterator | last | ||
) |
iterator s3d::String::insert | ( | const_iterator | where, |
size_t | count, | ||
value_type | ch | ||
) |
iterator s3d::String::insert | ( | const_iterator | where, |
value_type | ch | ||
) |
String& s3d::String::insert | ( | size_t | offset, |
const StringViewIsh & | s | ||
) |
String& s3d::String::insert | ( | size_t | offset, |
const value_type * | s | ||
) |
String& s3d::String::insert | ( | size_t | offset, |
size_t | count, | ||
value_type | ch | ||
) |
String& s3d::String::insert | ( | size_t | offset, |
std::initializer_list< value_type > | ilist | ||
) |
|
noexcept |
String& s3d::String::keep_if | ( | Fty | f | ) |
指定した条件を満たす要素のみを残して、それ以外を文字列から削除します。
Fty | 条件を記述した関数の型 |
f | 条件を記述した関数 |
|
noexcept |
文字を後方から逆順に検索し、最初にそれとは異なる文字が現れた位置を返します。
ch | 検索する文字 |
offset | 検索を開始する位置。npos の場合は終端から |
size_t s3d::String::lastIndexNotOfAny | ( | StringView | anyof, |
size_t | offset = npos |
||
) | const |
文字を後方から逆順に検索し、検索する文字に含まれない文字が最初に現れた位置を返します。
anyof | 検索する文字の集合 |
offset | 検索を開始する位置。npos の場合は終端から |
|
noexcept |
文字列を後方から逆順に検索し、最初に現れた位置を返します。
s | 検索する文字列 |
offset | 検索を開始する位置。npos の場合は終端から |
|
noexcept |
文字を後方から逆順に検索し、最初に現れた位置を返します。
ch | 検索する文字 |
offset | 検索を開始する位置。npos の場合は終端から |
|
noexcept |
文字を後方から逆順に検索し、検索する文字のいずれかが最初に現れた位置を返します。
anyof | 検索する文字の集合 |
offset | 検索を開始する位置。npos の場合は終端から |
String s3d::String::layout | ( | size_t | width | ) | const |
指定した 1 行の文字数で改行するようにした新しい文字列を返します。
width | 1 行の文字数 |
|
noexcept |
文字列の長さ(要素数)を返します。
|
noexcept |
別の文字列とのレーベンシュタイン距離を計算して返します。
other | 別の文字列 |
|
noexcept |
英字をすべて小文字にします。
String s3d::String::lowercased | ( | ) | && |
英字をすべて小文字にした新しい文字列を返します。
String s3d::String::lowercased | ( | ) | const & |
英字をすべて小文字にした新しい文字列を返します。
String& s3d::String::lpad | ( | size_t | length, |
value_type | fillChar = U' ' |
||
) |
文字列の左を埋め文字で埋めます。
length | 文字列の左を埋め文字で埋めた後の文字列の長さ |
fillChar | 埋め文字 |
length
より大きい場合、変更は行われません。 String s3d::String::lpadded | ( | size_t | length, |
value_type | fillChar = U' ' |
||
) | && |
文字列の左を埋め文字で埋めた新しい文字列を返します。
length | 文字列の左を埋め文字で埋めた後の文字列の長さ |
fillChar | 埋め文字 |
length
より大きい場合、元の文字列のコピーが返ります。 String s3d::String::lpadded | ( | size_t | length, |
value_type | fillChar = U' ' |
||
) | const & |
文字列の左を埋め文字で埋めた新しい文字列を返します。
length | 文字列の左を埋め文字で埋めた後の文字列の長さ |
fillChar | 埋め文字 |
length
より大きい場合、元の文字列のコピーが返ります。 String& s3d::String::ltrim | ( | ) |
文字列の先頭にある空白文字を削除します。
String s3d::String::ltrimmed | ( | ) | && |
文字列の先頭にある空白文字を削除した新しい文字列を返します。
String s3d::String::ltrimmed | ( | ) | const & |
文字列の先頭にある空白文字を削除した新しい文字列を返します。
auto s3d::String::map | ( | Fty | f | ) | const |
文字列の各要素に関数を適用した戻り値からなる配列を返します。
Fty | 各文字に適用する関数の型 |
f | 各文字に適用する関数 |
|
noexcept |
std::string s3d::String::narrow | ( | ) | const |
文字列を std::string に変換します。
bool s3d::String::none | ( | Fty | f = Identity | ) | const |
条件を満たす要素が存在しないかを返します。
Fty | 条件を記述した関数の型 |
f | 条件を記述した関数 |
|
explicitnoexcept |
文字列が空でないかを返します。
|
noexcept |
String& s3d::String::operator+= | ( | const string_type & | s | ) |
String& s3d::String::operator+= | ( | const StringViewIsh & | s | ) |
String& s3d::String::operator+= | ( | const value_type * | s | ) |
String& s3d::String::operator+= | ( | std::initializer_list< value_type > | ilist | ) |
String& s3d::String::operator+= | ( | value_type | ch | ) |
String& s3d::String::operator<< | ( | value_type | ch | ) |
String& s3d::String::operator= | ( | const string_type & | s | ) |
String& s3d::String::operator= | ( | const StringViewIsh & | s | ) |
String& s3d::String::operator= | ( | const value_type * | s | ) |
String& s3d::String::operator= | ( | std::initializer_list< value_type > | ilist | ) |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
末尾の文字を削除します。
|
noexcept |
末尾の n 文字を削除します。
n | 削除する文字数 |
void s3d::String::pop_front | ( | ) |
先頭の文字を削除します。
void s3d::String::pop_front_N | ( | size_t | n | ) |
先頭の n 文字を削除します。
n | 削除する文字数 |
void s3d::String::push_back | ( | value_type | ch | ) |
末尾に文字を追加します。
ch | 追加する文字 |
void s3d::String::push_front | ( | value_type | ch | ) |
先頭に文字を追加します。
ch | 追加する文字 |
|
noexcept |
|
noexcept |
void s3d::String::release | ( | ) |
String& s3d::String::remove | ( | StringView | s | ) |
指定した文字列をもとの文字列から削除します。
s | 削除する文字列 |
String& s3d::String::remove | ( | value_type | ch | ) |
指定した文字を文字列から削除します。
ch | 削除する文字 |
String& s3d::String::remove_at | ( | size_t | index | ) |
指定したインデックスにある要素を文字列から削除します。
index | インデックス |
String& s3d::String::remove_if | ( | Fty | f | ) |
指定した条件を満たす文字を削除します。
Fty | 条件を記述した関数の型 |
f | 条件を記述した関数 |
String s3d::String::removed | ( | StringView | s | ) | const |
指定した文字列を除去した新しい文字列を返します。
s | 除去対象の文字列 |
String s3d::String::removed | ( | value_type | ch | ) | && |
指定した文字を除去した新しい文字列を返します。
ch | 除去対象の文字 |
String s3d::String::removed | ( | value_type | ch | ) | const & |
指定した文字を除去した新しい文字列を返します。
ch | 除去対象の文字 |
String s3d::String::removed_at | ( | size_t | index | ) | && |
定したインデックスにある要素を削除した新しい文字列を返します。
index | インデックス |
String s3d::String::removed_at | ( | size_t | index | ) | const & |
定したインデックスにある要素を削除した新しい文字列を返します。
index | インデックス |
String s3d::String::removed_if | ( | Fty | f | ) | && |
指定した条件を満たす文字を削除した新しい文字列を返します。
Fty | 条件を記述した関数の型 |
f | 条件を記述した関数 |
String s3d::String::removed_if | ( | Fty | f | ) | const & |
指定した条件を満たす文字を削除した新しい文字列を返します。
Fty | 条件を記述した関数の型 |
f | 条件を記述した関数 |
|
noexcept |
|
noexcept |
String& s3d::String::replace | ( | const StringView | oldStr, |
const StringView | newStr | ||
) |
指定した文字列を置換します。
oldStr | 置換対象の文字列 |
newStr | 置換後の文字列 |
String& s3d::String::replace | ( | const_iterator | first, |
const_iterator | last, | ||
const String & | s | ||
) |
String& s3d::String::replace | ( | const_iterator | first, |
const_iterator | last, | ||
const StringViewIsh & | s | ||
) |
String& s3d::String::replace | ( | const_iterator | first, |
const_iterator | last, | ||
const value_type * | s | ||
) |
String& s3d::String::replace | ( | const_iterator | first, |
const_iterator | last, | ||
Iterator | first2, | ||
Iterator | last2 | ||
) |
String& s3d::String::replace | ( | size_type | pos, |
size_type | count, | ||
const StringViewIsh & | s | ||
) |
String& s3d::String::replace | ( | size_type | pos, |
size_type | count, | ||
const value_type * | s | ||
) |
String& s3d::String::replace | ( | value_type | oldChar, |
value_type | newChar | ||
) |
指定した文字を置換します。
oldChar | 置換対象の文字 |
newChar | 置換後の文字 |
String& s3d::String::replace_if | ( | Fty | f, |
const value_type | newChar | ||
) |
指定した条件を満たす文字を別の文字に置き換えます。
Fty | 条件を記述した関数の型 |
f | 条件を記述した関数 |
newChar | 置換後の文字 |
String s3d::String::replaced | ( | StringView | oldStr, |
StringView | newStr | ||
) | const |
指定した文字列を置換した新しい文字列を返します。
oldStr | 置換対象の文字列 |
newStr | 置換後の文字列 |
String s3d::String::replaced | ( | value_type | oldChar, |
value_type | newChar | ||
) | && |
指定した文字を置換した新しい文字列を返します。
oldChar | 置換対象の文字 |
newChar | 置換後の文字 |
String s3d::String::replaced | ( | value_type | oldChar, |
value_type | newChar | ||
) | const & |
指定した文字を置換した新しい文字列を返します。
oldChar | 置換対象の文字 |
newChar | 置換後の文字 |
String s3d::String::replaced_if | ( | Fty | f, |
const value_type | newChar | ||
) | && |
指定した条件を満たす文字を別の文字に置き換えた新しい文字列を返します。
Fty | 条件を記述した関数の型 |
f | 条件を記述した関数 |
newChar | 置換後の文字 |
String s3d::String::replaced_if | ( | Fty | f, |
const value_type | newChar | ||
) | const & |
指定した条件を満たす文字を別の文字に置き換えた新しい文字列を返します。
Fty | 条件を記述した関数の型 |
f | 条件を記述した関数 |
newChar | 置換後の文字 |
void s3d::String::reserve | ( | size_t | newCapacity | ) |
void s3d::String::resize | ( | size_t | newSize | ) |
void s3d::String::resize | ( | size_t | newSize, |
value_type | ch | ||
) |
String& s3d::String::reverse | ( | ) |
文字列を反転します。
String& s3d::String::reverse_each | ( | Fty | f | ) |
文字列の各文字への参照を引数に、末尾の文字から順に関数を呼び出します。
Fty | 呼び出す関数の型 |
f | 呼び出す関数 |
const String& s3d::String::reverse_each | ( | Fty | f | ) | const |
文字列の各文字への参照を引数に、末尾の文字から順に関数を呼び出します。
Fty | 呼び出す関数の型 |
f | 呼び出す関数 |
String s3d::String::reversed | ( | ) | && |
反転した文字列を返します。
String s3d::String::reversed | ( | ) | const & |
反転した文字列を返します。
String& s3d::String::rotate | ( | std::ptrdiff_t | count = 1 | ) |
文字列の各文字の位置をシフトさせ、はみ出た文字は反対側に挿入します。
count | 文字をシフトする数 |
String s3d::String::rotated | ( | std::ptrdiff_t | count = 1 | ) | && |
文字列の各文字の位置をシフトさせ、はみ出た文字を反対側に挿入した新しい文字列を返します。
count | 文字をシフトする数 |
String s3d::String::rotated | ( | std::ptrdiff_t | count = 1 | ) | const & |
文字列の各文字の位置をシフトさせ、はみ出た文字を反対側に挿入した新しい文字列を返します。
count | 文字をシフトする数 |
String& s3d::String::rpad | ( | size_t | length, |
value_type | fillChar = U' ' |
||
) |
文字列の右を埋め文字で埋めます。
length | 文字列の右を埋め文字で埋めた後の文字列の長さ |
fillChar | 埋め文字 |
length
より大きい場合、変更は行われません。 String s3d::String::rpadded | ( | size_t | length, |
value_type | fillChar = U' ' |
||
) | && |
文字列を指定された文字で右詰めした新しい文字列を返します。
length | 右詰めした後の文字列の長さ |
fillChar | 埋め文字 |
length
より大きい場合、元の文字列のコピーを返します。 String s3d::String::rpadded | ( | size_t | length, |
value_type | fillChar = U' ' |
||
) | const & |
文字列を指定された文字で右詰めした新しい文字列を返します。
length | 右詰めした後の文字列の長さ |
fillChar | 埋め文字 |
length
より大きい場合、元の文字列のコピーを返します。
|
noexcept |
String s3d::String::rsorted | ( | ) | && |
String s3d::String::rsorted | ( | ) | const & |
String& s3d::String::rtrim | ( | ) |
文字列の末尾にある空白文字を削除します。
String s3d::String::rtrimmed | ( | ) | && |
文字列の末尾にある空白文字を削除した新しい文字列を返します。
String s3d::String::rtrimmed | ( | ) | const & |
文字列の末尾にある空白文字を削除した新しい文字列を返します。
void s3d::String::shrink_to_fit | ( | ) |
String& s3d::String::shuffle | ( | ) |
文字列をランダムに並び替えます。
SIV3D_CONCEPT_URBG String& s3d::String::shuffle | ( | URBG && | rbg | ) |
指定された乱数生成器を使って文字列をランダムに並び替えます。
rbg | 使用する乱数生成器 |
String s3d::String::shuffled | ( | ) | && |
ランダムに並び替えた新しい文字列を返します。
String s3d::String::shuffled | ( | ) | const & |
ランダムに並び替えた新しい文字列を返します。
SIV3D_CONCEPT_URBG String s3d::String::shuffled | ( | URBG && | rbg | ) | && |
指定された乱数生成器を使ってランダムに並び替えた新しい文字列を返します。
rbg | 用する乱数生成器 |
SIV3D_CONCEPT_URBG String s3d::String::shuffled | ( | URBG && | rbg | ) | const & |
指定された乱数生成器を使ってランダムに並び替えた新しい文字列を返します。
rbg | 用する乱数生成器 |
|
noexcept |
|
noexcept |
|
noexcept |
文字列をソートします。
String& s3d::String::sort_and_unique | ( | ) |
文字列をソートし、重複する文字を削除します。
String& s3d::String::sort_by | ( | Fty | f | ) |
文字列を指定された比較関数でソートします。
Fty | 使用する比較関数の型 |
f | 使用する比較関数 |
String s3d::String::sorted | ( | ) | && |
文字列をソートした新しい文字列を返します。
String s3d::String::sorted | ( | ) | const & |
文字列をソートした新しい文字列を返します。
String s3d::String::sorted_and_uniqued | ( | ) | && |
文字列をソートし、重複する文字を削除した新しい文字列を返します。
String s3d::String::sorted_and_uniqued | ( | ) | const & |
文字列をソートし、重複する文字を削除した新しい文字列を返します。
String s3d::String::sorted_by | ( | Fty | f | ) | && |
文字列を指定された比較関数でソートした新しい文字列を返します。
Fty | 使用する比較関数の型 |
f | 使用する比較関数 |
String s3d::String::sorted_by | ( | Fty | f | ) | const & |
文字列を指定された比較関数でソートした新しい文字列を返します。
Fty | 使用する比較関数の型 |
f | 使用する比較関数 |
Array<String, std::allocator<String> > s3d::String::split | ( | value_type | ch | ) | const |
指定した区切り文字で文字列を分割します。
ch | 区切り文字 |
String& s3d::String::stable_unique | ( | ) |
文字列をソートせずに、重複する文字を削除します。
String s3d::String::stable_uniqued | ( | ) | const |
文字列をソートせずに、重複する文字を削除した新しい文字列を返します。
bool s3d::String::starts_with | ( | StringView | s | ) | const |
文字列が指定した文字列から始まるかを返します。
s | 検索する文字列 |
|
noexcept |
文字列が指定した文字から始まるかを返します。
ch | 検索する文字 |
|
noexcept |
|
noexcept |
部分文字列を取得します。
offset | 開始インデックス |
count | 取得する文字数。末尾までの場合 npos |
|
delete |
StringView s3d::String::substrView | ( | size_t | offset = 0 , |
size_t | count = npos |
||
) | const & |
部分文字列へのビューを取得します。
offset | 開始インデックス |
count | 取得する文字数。末尾までの場合 npos |
|
noexcept |
|
noexcept |
英字の大文字と小文字を入れ替えます。
String s3d::String::swapcased | ( | ) | && |
英字の大文字と小文字を入れ替えた文字列を返します。
String s3d::String::swapcased | ( | ) | const & |
英字の大文字と小文字を入れ替えた文字列を返します。
String s3d::String::take | ( | size_t | n | ) | const |
文字列の先頭から指定された文字数分取り出した新しい文字列を返します。
n | 取り出す文字数 |
String s3d::String::take_while | ( | Fty | f | ) | const |
文字列の先頭から、指定された条件を満たす連続した文字を取り出した新しい文字列を返します。
Fty | 条件を記述した関数の型 |
f | 条件を記述した関数 |
std::u16string s3d::String::toUTF16 | ( | ) | const |
文字列を UTF-16 文字列に変換します。
|
noexcept |
文字列を UTF-32 文字列に変換します。
std::string s3d::String::toUTF8 | ( | ) | const |
文字列を UTF-8 文字列に変換します。
std::wstring s3d::String::toWstr | ( | ) | const |
文字列を std::wstring に変換します。
String& s3d::String::trim | ( | ) |
文字列の先頭と末尾にある空白文字を削除します。
String s3d::String::trimmed | ( | ) | && |
文字列の先頭と末尾にある空白文字を削除した新しい文字列を返します。
String s3d::String::trimmed | ( | ) | const & |
文字列の先頭と末尾にある空白文字を削除した新しい文字列を返します。
String& s3d::String::unique_consecutive | ( | ) |
同じ文字が連続する場合、その先頭以外を除去します。
String s3d::String::uniqued_consecutive | ( | ) | && |
同じ文字が連続する場合、その先頭以外を除去した新しい文字列を返します。
String s3d::String::uniqued_consecutive | ( | ) | const & |
同じ文字が連続する場合、その先頭以外を除去した新しい文字列を返します。
|
noexcept |
英字をすべて大文字にします。
String s3d::String::uppercased | ( | ) | && |
英字をすべて大文字にした文字列を返します。
String s3d::String::uppercased | ( | ) | const & |
英字をすべて大文字にした文字列を返します。
String s3d::String::values_at | ( | std::initializer_list< size_t > | indices | ) | const |
複数のインデックスを取り、それらの文字からなる新しい文字列を返します。
indices | インデックス |
String("abcde").values_at({0, 3, 4}); // "ade"
String& s3d::String::xml_escape | ( | ) |
文字列に XML エスケープを行います。
String s3d::String::xml_escaped | ( | ) | const |
XML エスケープした文字列を返します。
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |