|
Bifrost SDK
Bifrost SDK documentation
|
The string class used by Amino. More...
#include <String.h>
Public Types | |
| using | value_type = char |
| using | iterator = value_type * |
| using | const_iterator = const value_type * |
| using | size_type = std::size_t |
| using | difference_type = std::ptrdiff_t |
Public Member Functions | |
| String () | |
| Construct an empty string. More... | |
| String (std::nullptr_t)=delete | |
| Constructing a String from a nullptr_t is not allowed. More... | |
| String (const String &str) | |
| Copy constructor. More... | |
| String (String &&str) noexcept | |
| Move constructor. More... | |
| String (const String &str, size_type pos, size_type len=npos) | |
| Construct a string from another. More... | |
| String (const char *s) | |
| Construct a string from char char*. More... | |
| String (const char *s, size_type n) | |
| Construct a string from a char*. More... | |
| String (StringView sv) | |
| Construct a String from a StringView. More... | |
| String (size_type n, char c) | |
| Construct a string by filling it. More... | |
| ~String () | |
| Destructor. More... | |
| String & | append (const char *s, size_type n) |
| Appends a char* to the string. More... | |
| String & | append (const String &str, size_type subpos, size_type sublen) |
| Appends a part of a string. More... | |
| String & | append (size_type n, char c) |
| Append the same character multiple times. More... | |
| String & | assign (const char *s, size_type n) |
| Assign a char* to the string. More... | |
| String & | assign (const String &str, size_type subpos, size_type sublen) |
| String & | assign (size_type n, char c) |
| Assign a character multiple times to the string. More... | |
| char & | at (size_type pos) |
| Return a character at a position. More... | |
| const char & | at (size_type pos) const |
| Return a character at a position. More... | |
| char & | back () |
| Return the last character. More... | |
| const char & | back () const |
| Return the last character. More... | |
| size_type | capacity () const |
| Return the allocated storage size of the string. More... | |
| void | clear () |
| Clear the string. More... | |
| int | compare (size_type pos, size_type len, const String &str) const |
| Compare a string. More... | |
| int | compare (size_type pos, size_type len, const String &str, size_type subpos, size_type sublen) const |
| Compare a string. More... | |
| int | compare (size_type pos, size_type len, const char *s) const |
| Compare a string. More... | |
| int | compare (size_type pos, size_type len, const char *s, size_type n) const |
| Compare a string. More... | |
| size_type | copy (char *s, size_type len, size_type pos=0) const |
| Copy part of the string into a char*. More... | |
| const char * | c_str () const |
| Return the string as a char*. More... | |
| const char * | data () const |
| Return the string as a char*. More... | |
| bool | empty () const |
| Return true if this string is empty. More... | |
| String & | erase (size_type pos=0, size_type len=npos) |
| Erase a part of a string. More... | |
| size_type | length () const |
| Return the length of the string. More... | |
| size_type | max_size () const |
| Return the maximum size this string can reach. More... | |
| char & | operator[] (size_type pos) |
| Return a character at a position. More... | |
| const char & | operator[] (size_type pos) const |
| Return a character at a position. More... | |
| void | pop_back () |
| Remove the last character of the string. More... | |
| void | push_back (char c) |
| Push a new character onto the back of the string. More... | |
| void | reserve (size_type n=0) |
| Change the capacity of the string. More... | |
| void | resize (size_type n) |
| Change the size of the string. More... | |
| void | resize (size_type n, char c) |
| Change the size of the string. More... | |
| void | shrink_to_fit () |
| Try to reduce the memory footprint of the string. More... | |
| size_type | size () const |
| Return the size of the string. More... | |
| String | substr (size_type pos=0, size_type len=npos) const |
| Return a part of this string. More... | |
| void | swap (String &str) |
| Swap this string with another. More... | |
| const char * | asChar () const |
| Return the string as a char*. More... | |
| String & | operator= (const String &s) |
| Assign to a string. More... | |
| String & | operator= (String &&s) noexcept |
| Assign to a string. More... | |
| String & | operator= (const char *s) |
| Assign to a string. More... | |
| String & | operator= (char s) |
| Assign to a string. More... | |
| template<typename StringViewLike , typename = enable_if_string_view_like<StringViewLike>> | |
| AMINO_INTERNAL_FORCEINLINE String & | operator= (StringViewLike const &s) |
| Assign to a string. More... | |
| AMINO_INTERNAL_FORCEINLINE | operator std::string_view () const |
| std::string_view conversions More... | |
| String & | append (const String &s) |
| Append a copy of a string. More... | |
| String & | append (String &&s) |
| Append a copy of a string. More... | |
| String & | append (const char *s) |
| Append a copy of a string. More... | |
| template<typename StringViewLike > | |
| AMINO_INTERNAL_FORCEINLINE enable_if_string_view_like< StringViewLike, String & > | append (StringViewLike const &s) |
| Append a copy of a string. More... | |
| String & | assign (const String &s) |
| Assign a string. More... | |
| String & | assign (String &&s) noexcept |
| Assign a string. More... | |
| String & | assign (const char *s) |
| Assign a string. More... | |
| template<typename StringViewLike > | |
| AMINO_INTERNAL_FORCEINLINE enable_if_string_view_like< StringViewLike, String & > | assign (StringViewLike const &s) |
| Assign a string. More... | |
| int | compare (const String &s) const |
| Compare a string. More... | |
| int | compare (const char *s) const |
| Compare a string. More... | |
| template<typename StringViewLike > | |
| AMINO_INTERNAL_FORCEINLINE enable_if_string_view_like< StringViewLike, int > | compare (StringViewLike const &s) const |
| Compare a string. More... | |
| size_type | find (const String &str, size_type pos=0) const |
| Multiple methods for finding strings. More... | |
| size_type | find (const char *s, size_type pos=0) const |
| Multiple methods for finding strings. More... | |
| size_type | find (const char *s, size_type pos, size_type n) const |
| Multiple methods for finding strings. More... | |
| size_type | find (char c, size_type pos=0) const |
| Multiple methods for finding strings. More... | |
| size_type | find_first_not_of (const String &str, size_type pos=0) const |
| Multiple methods for finding the first character that does not match. More... | |
| size_type | find_first_not_of (const char *s, size_type pos=0) const |
| Multiple methods for finding the first character that does not match. More... | |
| size_type | find_first_not_of (const char *s, size_type pos, size_type n) const |
| Multiple methods for finding the first character that does not match. More... | |
| size_type | find_first_not_of (char c, size_type pos=0) const |
| Multiple methods for finding the first character that does not match. More... | |
| size_type | find_first_of (const String &str, size_type pos=0) const |
| Multiple methods for finding the first character that matches. More... | |
| size_type | find_first_of (const char *s, size_type pos=0) const |
| Multiple methods for finding the first character that matches. More... | |
| size_type | find_first_of (const char *s, size_type pos, size_type n) const |
| Multiple methods for finding the first character that matches. More... | |
| size_type | find_first_of (char c, size_type pos=0) const |
| Multiple methods for finding the first character that matches. More... | |
| size_type | find_last_not_of (const String &str, size_type pos=npos) const |
| Multiple methods for finding the first character that does not match from the end. More... | |
| size_type | find_last_not_of (const char *s, size_type pos=npos) const |
| Multiple methods for finding the first character that does not match from the end. More... | |
| size_type | find_last_not_of (const char *s, size_type pos, size_type n) const |
| Multiple methods for finding the first character that does not match from the end. More... | |
| size_type | find_last_not_of (char c, size_type pos=npos) const |
| Multiple methods for finding the first character that does not match from the end. More... | |
| size_type | find_last_of (const String &str, size_type pos=npos) const |
| Multiple methods for finding the first character that matches from the end. More... | |
| size_type | find_last_of (const char *s, size_type pos=npos) const |
| Multiple methods for finding the first character that matches from the end. More... | |
| size_type | find_last_of (const char *s, size_type pos, size_type n) const |
| Multiple methods for finding the first character that matches from the end. More... | |
| size_type | find_last_of (char c, size_type pos=npos) const |
| Multiple methods for finding the first character that matches from the end. More... | |
| iterator | begin () |
| const_iterator | begin () const |
| const_iterator | cbegin () const |
| iterator | end () |
| const_iterator | end () const |
| const_iterator | cend () const |
| char & | front () |
| const char & | front () const |
| String & | insert (size_type pos, const String &str) |
| Multiple methods for string insertion. More... | |
| String & | insert (size_type pos, const String &str, size_type subpos, size_type sublen) |
| Multiple methods for string insertion. More... | |
| String & | insert (size_type pos, const char *s) |
| Multiple methods for string insertion. More... | |
| String & | insert (size_type pos, const char *s, size_type n) |
| Multiple methods for string insertion. More... | |
| String & | insert (size_type pos, size_type n, char c) |
| Multiple methods for string insertion. More... | |
| String & | operator+= (const String &s) |
| The append operator. More... | |
| String & | operator+= (const char *s) |
| The append operator. More... | |
| String & | operator+= (char s) |
| The append operator. More... | |
| template<typename StringViewLike > | |
| AMINO_INTERNAL_FORCEINLINE enable_if_string_view_like< StringViewLike, String & > | operator+= (StringViewLike const &s) |
| The append operator. More... | |
| String & | replace (size_type pos, size_type len, const String &str) |
| Multiple methods for string replacement. More... | |
| String & | replace (size_type pos, size_type len, const String &str, size_type subpos, size_type sublen) |
| Multiple methods for string replacement. More... | |
| String & | replace (size_type pos, size_type len, const char *s) |
| Multiple methods for string replacement. More... | |
| String & | replace (size_type pos, size_type len, const char *s, size_type n) |
| Multiple methods for string replacement. More... | |
| String & | replace (size_type pos, size_type len, size_type n, char c) |
| Multiple methods for string replacement. More... | |
| size_type | rfind (const String &str, size_type pos=npos) const |
| Multiple methods for finding a string starting from the end. More... | |
| size_type | rfind (const char *s, size_type pos=npos) const |
| Multiple methods for finding a string starting from the end. More... | |
| size_type | rfind (const char *s, size_type pos, size_type n) const |
| Multiple methods for finding a string starting from the end. More... | |
| size_type | rfind (char c, size_type pos=npos) const |
| Multiple methods for finding a string starting from the end. More... | |
| bool | operator== (const String &rhs) const |
| Operator ==. More... | |
| bool | operator== (char const *rhs) const |
| Operator ==. More... | |
| template<typename StringViewLike > | |
| AMINO_INTERNAL_FORCEINLINE enable_if_string_view_like< StringViewLike, bool > | operator== (StringViewLike const &rhs) const |
| Operator ==. More... | |
| bool | operator!= (const String &rhs) const |
| Operator !=. More... | |
| bool | operator!= (char const *rhs) const |
| Operator !=. More... | |
| template<typename StringViewLike > | |
| AMINO_INTERNAL_FORCEINLINE enable_if_string_view_like< StringViewLike, bool > | operator!= (StringViewLike const &rhs) const |
| Operator !=. More... | |
| template<typename T > | |
| AMINO_INTERNAL_FORCEINLINE auto | operator< (T const &rhs) const -> decltype(compare(rhs)< 0) |
| Operator <. More... | |
| template<typename T > | |
| AMINO_INTERNAL_FORCEINLINE auto | operator> (T const &rhs) const -> decltype(compare(rhs) > 0) |
| Operator <. More... | |
| template<typename T > | |
| AMINO_INTERNAL_FORCEINLINE auto | operator<= (T const &rhs) const -> decltype(compare(rhs)<=0) |
| Operator <. More... | |
| template<typename T > | |
| AMINO_INTERNAL_FORCEINLINE auto | operator>= (T const &rhs) const -> decltype(compare(rhs) >=0) |
| Operator <. More... | |
Static Public Member Functions | |
| static AMINO_INTERNAL_FORCEINLINE String | concat () |
| Concatenate multiple strings. More... | |
| template<typename S > | |
| static AMINO_INTERNAL_FORCEINLINE std::enable_if_t< std::is_constructible_v< String, S >, String > | concat (S &&s) |
| Concatenate multiple strings. More... | |
| template<typename S1 , typename S2 , typename... S> | |
| static AMINO_INTERNAL_FORCEINLINE String | concat (S1 const &s1, S2 const &s2, S &&... s) |
| Concatenate multiple strings. More... | |
| static String | concat (SpanParam< StringView const > const &strs) |
| Concatenate multiple strings. More... | |
Static Public Attributes | |
| static constexpr size_type | npos = ~size_type(0) |
| Maximum value for a size_type. More... | |
The string class used by Amino.
| using Amino::String::const_iterator = const value_type* |
| using Amino::String::difference_type = std::ptrdiff_t |
| using Amino::String::iterator = value_type* |
| using Amino::String::size_type = std::size_t |
| using Amino::String::value_type = char |
| Amino::String::String | ( | ) |
Construct an empty string.
|
delete |
Constructing a String from a nullptr_t is not allowed.
| Amino::String::String | ( | const String & | str | ) |
Copy constructor.
| str | The string to copy |
|
noexcept |
Move constructor.
| str | The string to move |
Construct a string from another.
The portion of the string to copy is specified by the starting position and length. If the string is too short or len is npos then the entire string will be copied
| str | The other string |
| pos | The position to start from |
| len | The number of characters to take |
| Amino::String::String | ( | const char * | s | ) |
Construct a string from char char*.
| s | The char * to use |
| Amino::String::String | ( | const char * | s, |
| size_type | n | ||
| ) |
Construct a string from a char*.
| s | The char* to use |
| n | The number of characters to take from the char* buffer |
|
inlineexplicit |
Construct a String from a StringView.
| sv | The StringView from which to copy the data when constructing the String. |
| Amino::String::String | ( | size_type | n, |
| char | c | ||
| ) |
Construct a string by filling it.
| n | The number or characters to fill |
| c | The character to use in the fill |
| Amino::String::~String | ( | ) |
Destructor.
| String & Amino::String::append | ( | const char * | s | ) |
Append a copy of a string.
| s | The string to append |
Appends a char* to the string.
| s | The char* to append |
| n | The number of characters from the char* buffer to append |
Append a copy of a string.
| s | The string to append |
Appends a part of a string.
The portion of the string to append is specified by the sub position and sub length. If the string is too short or len is npos then the entire string will be copied
| str | The string to append |
| subpos | The subposition of the string to use |
| sublen | The sub length to use |
Append the same character multiple times.
| n | The number of times to append the character |
| c | The character to append |
Append a copy of a string.
| s | The string to append |
|
inline |
| const char * Amino::String::asChar | ( | ) | const |
Return the string as a char*.
|
inline |
Assign a char* to the string.
| s | The char* to assign |
| n | The number of characters from the char* buffer to assign |
Assign a part of a string
The portion of the string to assign is specified by the sub position and sub length. If the string is too short or len is npos then the entire string will be copied
| str | The string to assign a part of |
| subpos | The sub position to use |
| sublen | The sub length to use |
Assign a character multiple times to the string.
| n | The number of times to assign the character |
| c | The character to assign |
|
inline |
| char & Amino::String::at | ( | size_type | pos | ) |
Return a character at a position.
| pos | The position of the character |
| const char & Amino::String::at | ( | size_type | pos | ) | const |
Return a character at a position.
| pos | The position of the character |
| char & Amino::String::back | ( | ) |
Return the last character.
| const char & Amino::String::back | ( | ) | const |
Return the last character.
| iterator Amino::String::begin | ( | ) |
Return an iterator to the beginning of the string
|
inline |
| const char * Amino::String::c_str | ( | ) | const |
Return the string as a char*.
Referenced by std::hash< Amino::String >::operator()(), and Amino::operator<<().
| size_type Amino::String::capacity | ( | ) | const |
Return the allocated storage size of the string.
This is not necessarily the same as the string length
| const_iterator Amino::String::cbegin | ( | ) | const |
Return an iterator to the beginning of the string
| const_iterator Amino::String::cend | ( | ) | const |
Return an iterator to the end of the string
| void Amino::String::clear | ( | ) |
Clear the string.
empty() == true | int Amino::String::compare | ( | const char * | s | ) | const |
Compare a string.
| s | The string to compare to |
| int Amino::String::compare | ( | const String & | s | ) | const |
Compare a string.
| s | The string to compare to |
Compare a string.
| s | The char* to compare to |
| pos | The position to start at |
| len | The number of characters to compare |
Compare a string.
| s | The char* to compare to |
| pos | The position to start at |
| len | The number of characters to compare |
| n | The number of characters in the char* buffer to compare to |
Compare a string.
| str | The string to compare to |
| pos | The position to start at |
| len | The number of characters to compare |
| int Amino::String::compare | ( | size_type | pos, |
| size_type | len, | ||
| const String & | str, | ||
| size_type | subpos, | ||
| size_type | sublen | ||
| ) | const |
Compare a string.
| str | The string to compare to |
| pos | The position to start at |
| len | The number of characters to compare |
| subpos | The position in str to use |
| sublen | The number of characters in str to use |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
static |
Concatenate multiple strings.
Copy part of the string into a char*.
Method does not append a null character at the end of the string
| s | The char* array to copy into |
| len | The number of characters to copy |
| pos | The position of the first character to be copied |
| const char * Amino::String::data | ( | ) | const |
Return the string as a char*.
| bool Amino::String::empty | ( | ) | const |
Return true if this string is empty.
| iterator Amino::String::end | ( | ) |
Return an iterator to the end of the string
|
inline |
Erase a part of a string.
| pos | The starting position |
| len | The number of string positions to erase |
Multiple methods for finding strings.
Searches can be done for Strings, char* or char. The pos parameter is where the search is started in this string. The n parameter gives how many characters out of the char* buffer to use in the search. The return value is the position of the first character that matches or npos if there is no match.
Multiple methods for finding strings.
Searches can be done for Strings, char* or char. The pos parameter is where the search is started in this string. The n parameter gives how many characters out of the char* buffer to use in the search. The return value is the position of the first character that matches or npos if there is no match.
Multiple methods for finding strings.
Searches can be done for Strings, char* or char. The pos parameter is where the search is started in this string. The n parameter gives how many characters out of the char* buffer to use in the search. The return value is the position of the first character that matches or npos if there is no match.
Multiple methods for finding strings.
Searches can be done for Strings, char* or char. The pos parameter is where the search is started in this string. The n parameter gives how many characters out of the char* buffer to use in the search. The return value is the position of the first character that matches or npos if there is no match.
Multiple methods for finding the first character that does not match.
Matches can be performed by string, char* or char. The pos parameter is the starting point in the string. The n parameter is the starting point in the char* buffer array. The return values is the position for the first character that does not match or npos otherwise
Multiple methods for finding the first character that does not match.
Matches can be performed by string, char* or char. The pos parameter is the starting point in the string. The n parameter is the starting point in the char* buffer array. The return values is the position for the first character that does not match or npos otherwise
Multiple methods for finding the first character that does not match.
Matches can be performed by string, char* or char. The pos parameter is the starting point in the string. The n parameter is the starting point in the char* buffer array. The return values is the position for the first character that does not match or npos otherwise
Multiple methods for finding the first character that does not match.
Matches can be performed by string, char* or char. The pos parameter is the starting point in the string. The n parameter is the starting point in the char* buffer array. The return values is the position for the first character that does not match or npos otherwise
Multiple methods for finding the first character that matches.
Matches can be performed by string, char* or char. The pos parameter is the starting point in the string. The n parameter is the starting point in the char* buffer array. The return values is the position for the first character that match or npos otherwise
Multiple methods for finding the first character that matches.
Matches can be performed by string, char* or char. The pos parameter is the starting point in the string. The n parameter is the starting point in the char* buffer array. The return values is the position for the first character that match or npos otherwise
Multiple methods for finding the first character that matches.
Matches can be performed by string, char* or char. The pos parameter is the starting point in the string. The n parameter is the starting point in the char* buffer array. The return values is the position for the first character that match or npos otherwise
Multiple methods for finding the first character that matches.
Matches can be performed by string, char* or char. The pos parameter is the starting point in the string. The n parameter is the starting point in the char* buffer array. The return values is the position for the first character that match or npos otherwise
Multiple methods for finding the first character that does not match from the end.
Matches can be performed by string, char* or char. The pos parameter is the starting point in the string. The n parameter is the starting point in the char* buffer array. The return values is the position for the first character that does not match or npos otherwise
Multiple methods for finding the first character that does not match from the end.
Matches can be performed by string, char* or char. The pos parameter is the starting point in the string. The n parameter is the starting point in the char* buffer array. The return values is the position for the first character that does not match or npos otherwise
Multiple methods for finding the first character that does not match from the end.
Matches can be performed by string, char* or char. The pos parameter is the starting point in the string. The n parameter is the starting point in the char* buffer array. The return values is the position for the first character that does not match or npos otherwise
Multiple methods for finding the first character that does not match from the end.
Matches can be performed by string, char* or char. The pos parameter is the starting point in the string. The n parameter is the starting point in the char* buffer array. The return values is the position for the first character that does not match or npos otherwise
Multiple methods for finding the first character that matches from the end.
Matches can be performed by string, char* or char. The pos parameter is the starting point in the string. The n parameter is the starting point in the char* buffer array. The return values is the position for the first character that match or npos otherwise
Multiple methods for finding the first character that matches from the end.
Matches can be performed by string, char* or char. The pos parameter is the starting point in the string. The n parameter is the starting point in the char* buffer array. The return values is the position for the first character that match or npos otherwise
Multiple methods for finding the first character that matches from the end.
Matches can be performed by string, char* or char. The pos parameter is the starting point in the string. The n parameter is the starting point in the char* buffer array. The return values is the position for the first character that match or npos otherwise
Multiple methods for finding the first character that matches from the end.
Matches can be performed by string, char* or char. The pos parameter is the starting point in the string. The n parameter is the starting point in the char* buffer array. The return values is the position for the first character that match or npos otherwise
| char & Amino::String::front | ( | ) |
Return the first character of the string
| const char & Amino::String::front | ( | ) | const |
Return the first character of the string
Multiple methods for string insertion.
String insertion can be done by String, char* or char. The pos parameter is the starting position of the insertion. The subpos is the starting position of the string to be inserted while the sublen is how many characters of the string should be inserted. The n parameter is how many characters of the char* buffer should be copied. The result is the new string
Multiple methods for string insertion.
String insertion can be done by String, char* or char. The pos parameter is the starting position of the insertion. The subpos is the starting position of the string to be inserted while the sublen is how many characters of the string should be inserted. The n parameter is how many characters of the char* buffer should be copied. The result is the new string
Multiple methods for string insertion.
String insertion can be done by String, char* or char. The pos parameter is the starting position of the insertion. The subpos is the starting position of the string to be inserted while the sublen is how many characters of the string should be inserted. The n parameter is how many characters of the char* buffer should be copied. The result is the new string
| String & Amino::String::insert | ( | size_type | pos, |
| const String & | str, | ||
| size_type | subpos, | ||
| size_type | sublen | ||
| ) |
Multiple methods for string insertion.
String insertion can be done by String, char* or char. The pos parameter is the starting position of the insertion. The subpos is the starting position of the string to be inserted while the sublen is how many characters of the string should be inserted. The n parameter is how many characters of the char* buffer should be copied. The result is the new string
Multiple methods for string insertion.
String insertion can be done by String, char* or char. The pos parameter is the starting position of the insertion. The subpos is the starting position of the string to be inserted while the sublen is how many characters of the string should be inserted. The n parameter is how many characters of the char* buffer should be copied. The result is the new string
| size_type Amino::String::length | ( | ) | const |
Return the length of the string.
| size_type Amino::String::max_size | ( | ) | const |
Return the maximum size this string can reach.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinepure virtual |
| String & Amino::String::operator= | ( | char | s | ) |
Assign to a string.
| s | The string/character(s) to assign |
| String & Amino::String::operator= | ( | const char * | s | ) |
Assign to a string.
| s | The string/character(s) to assign |
Assign to a string.
| s | The string/character(s) to assign |
Assign to a string.
| s | The string/character(s) to assign |
|
inline |
| bool Amino::String::operator== | ( | char const * | rhs | ) | const |
Operator ==.
| rhs | The string to compare to |
| bool Amino::String::operator== | ( | const String & | rhs | ) | const |
Operator ==.
| rhs | The string to compare to |
|
inline |
|
inline |
|
inlinepure virtual |
| char & Amino::String::operator[] | ( | size_type | pos | ) |
Return a character at a position.
| pos | The position of the character |
| const char & Amino::String::operator[] | ( | size_type | pos | ) | const |
Return a character at a position.
| pos | The position of the character |
| void Amino::String::pop_back | ( | ) |
Remove the last character of the string.
| void Amino::String::push_back | ( | char | c | ) |
Push a new character onto the back of the string.
| c | The new character to add to the back |
Multiple methods for string replacement.
String replacement can be done with a String, char* or char. The pos parameter is the starting position of the replacement in this string. The len parameter is the length of the replacement in this string. The subpos and sublen are the equivalents in the String parameter for that specific method.
Multiple methods for string replacement.
String replacement can be done with a String, char* or char. The pos parameter is the starting position of the replacement in this string. The len parameter is the length of the replacement in this string. The subpos and sublen are the equivalents in the String parameter for that specific method.
Multiple methods for string replacement.
String replacement can be done with a String, char* or char. The pos parameter is the starting position of the replacement in this string. The len parameter is the length of the replacement in this string. The subpos and sublen are the equivalents in the String parameter for that specific method.
| String & Amino::String::replace | ( | size_type | pos, |
| size_type | len, | ||
| const String & | str, | ||
| size_type | subpos, | ||
| size_type | sublen | ||
| ) |
Multiple methods for string replacement.
String replacement can be done with a String, char* or char. The pos parameter is the starting position of the replacement in this string. The len parameter is the length of the replacement in this string. The subpos and sublen are the equivalents in the String parameter for that specific method.
Multiple methods for string replacement.
String replacement can be done with a String, char* or char. The pos parameter is the starting position of the replacement in this string. The len parameter is the length of the replacement in this string. The subpos and sublen are the equivalents in the String parameter for that specific method.
| void Amino::String::reserve | ( | size_type | n = 0 | ) |
Change the capacity of the string.
| n | The new size |
| void Amino::String::resize | ( | size_type | n | ) |
Change the size of the string.
| n | The new size of the string |
| void Amino::String::resize | ( | size_type | n, |
| char | c | ||
| ) |
Change the size of the string.
| n | The new size of the string |
| c | The fill character to use if the string was expanded |
Multiple methods for finding a string starting from the end.
We can search for a String, char* or char. The pos parameter gives the starting position while the n parameter is how much characters to search for. The return value is the first character of the match or npos if there is no match
Multiple methods for finding a string starting from the end.
We can search for a String, char* or char. The pos parameter gives the starting position while the n parameter is how much characters to search for. The return value is the first character of the match or npos if there is no match
Multiple methods for finding a string starting from the end.
We can search for a String, char* or char. The pos parameter gives the starting position while the n parameter is how much characters to search for. The return value is the first character of the match or npos if there is no match
Multiple methods for finding a string starting from the end.
We can search for a String, char* or char. The pos parameter gives the starting position while the n parameter is how much characters to search for. The return value is the first character of the match or npos if there is no match
| void Amino::String::shrink_to_fit | ( | ) |
Try to reduce the memory footprint of the string.
| size_type Amino::String::size | ( | ) | const |
Return the size of the string.
Return a part of this string.
| pos | The position to start at |
| len | The number of characters to take |
| void Amino::String::swap | ( | String & | str | ) |
Swap this string with another.
| str | The other string to swap |