eosio::string
#include <string.hpp>
Public Functions
Name | |
---|---|
template <size_t N> constexpr | string(const char(&) str[N]) |
constexpr | string() |
constexpr | string(const char * str, const size_t n) |
constexpr | string(const size_t n, const char c) |
constexpr | string(const string & str, const size_t pos, const size_t n) |
constexpr | string(const string & str) |
constexpr | string(string && str) |
string & | operator=(const string & str) |
string & | operator=(string && str) |
string & | operator=(const char * str) |
char & | operator[](const size_t n) |
const char | operator[](const size_t n) const |
char & | at(const size_t n) |
const char | at(const size_t n) const |
char & | front() |
const char | front() const |
char & | back() |
const char | back() const |
char * | data() |
const char * | data() const |
const char * | c_str() const |
char * | begin() |
const char * | cbegin() const |
char * | end() |
const char * | cend() const |
bool | empty() const |
size_t | size() const |
size_t | length() const |
size_t | capacity() const |
size_t | max_size() const |
void | reserve(const size_t n) |
void | shrink_to_fit() |
void | clear() |
void | resize(const size_t n) |
void | swap(string & str) |
void | push_back(const char c) |
void | pop_back() |
string | substr(size_t pos =0, size_t len =npos) const |
size_t | copy(char * s, size_t len, size_t pos =0) const |
string & | insert(const size_t pos, const char * str) |
string & | insert(const size_t pos, const char * str, const size_t len) |
string & | insert(const size_t pos, const string & str) |
string & | erase(size_t pos =0, size_t len =npos) |
string & | append(const char * str) |
string & | append(const string & str) |
string & | operator+=(const char c) |
string & | operator+=(const char * rhs) |
string & | operator+=(const string & rhs) |
void | print() const |
Public Attributes
Name | |
---|---|
constexpr size_t | npos |
Friends
Name | |
---|---|
bool | operator<(const string & lhs, const string & rhs) |
bool | operator>(const string & lhs, const string & rhs) |
bool | operator<=(const string & lhs, const string & rhs) |
bool | operator>=(const string & lhs, const string & rhs) |
bool | operator==(const string & lhs, const string & rhs) |
bool | operator!=(const string & lhs, const string & rhs) |
string | operator+(const string & lhs, const string & rhs) |
Public Functions Documentation
function string
template <size_t N>
inline constexpr string(
const char(&) str[N]
)
function string
inline constexpr string()
function string
inline constexpr string(
const char * str,
const size_t n
)
function string
inline constexpr string(
const size_t n,
const char c
)
function string
inline constexpr string(
const string & str,
const size_t pos,
const size_t n
)
function string
inline constexpr string(
const string & str
)
function string
inline constexpr string(
string && str
)
function operator=
inline string & operator=(
const string & str
)
function operator=
inline string & operator=(
string && str
)
function operator=
inline string & operator=(
const char * str
)
function operator[]
inline char & operator[](
const size_t n
)
function operator[]
inline const char operator[](
const size_t n
) const
function at
inline char & at(
const size_t n
)
function at
inline const char at(
const size_t n
) const
function front
inline char & front()
function front
inline const char front() const
function back
inline char & back()
function back
inline const char back() const
function data
inline char * data()
function data
inline const char * data() const
function c_str
inline const char * c_str() const
function begin
inline char * begin()
function cbegin
inline const char * cbegin() const
function end
inline char * end()
function cend
inline const char * cend() const
function empty
inline bool empty() const
function size
inline size_t size() const
function length
inline size_t length() const
function capacity
inline size_t capacity() const
function max_size
inline size_t max_size() const
function reserve
inline void reserve(
const size_t n
)
function shrink_to_fit
inline void shrink_to_fit()
function clear
inline void clear()
function resize
inline void resize(
const size_t n
)
function swap
inline void swap(
string & str
)
function push_back
inline void push_back(
const char c
)
function pop_back
inline void pop_back()
function substr
inline string substr(
size_t pos =0,
size_t len =npos
) const
function copy
inline size_t copy(
char * s,
size_t len,
size_t pos =0
) const
function insert
inline string & insert(
const size_t pos,
const char * str
)
function insert
inline string & insert(
const size_t pos,
const char * str,
const size_t len
)
function insert
inline string & insert(
const size_t pos,
const string & str
)
function erase
inline string & erase(
size_t pos =0,
size_t len =npos
)
function append
inline string & append(
const char * str
)
function append
inline string & append(
const string & str
)
function operator+=
inline string & operator+=(
const char c
)
function operator+=
inline string & operator+=(
const char * rhs
)
function operator+=
inline string & operator+=(
const string & rhs
)
function print
inline void print() const
Public Attributes Documentation
variable npos
static constexpr size_t npos = -1;
Friends
friend operator<
friend bool operator<(
const string & lhs,
const string & rhs
);
friend operator>
friend bool operator>(
const string & lhs,
const string & rhs
);
friend operator<=
friend bool operator<=(
const string & lhs,
const string & rhs
);
friend operator>=
friend bool operator>=(
const string & lhs,
const string & rhs
);
friend operator==
friend bool operator==(
const string & lhs,
const string & rhs
);
friend operator!=
friend bool operator!=(
const string & lhs,
const string & rhs
);
friend operator+
friend string operator+(
const string & lhs,
const string & rhs
);
Updated on 2022-12-05 at 15:38:07 +0000