Skip to main content

eosio::string

#include <string.hpp>

Public Functions

Name
template <size_t N>
constexpr
string(const char(&) str[N])
constexprstring()
constexprstring(const char * str, const size_t n)
constexprstring(const size_t n, const char c)
constexprstring(const string & str, const size_t pos, const size_t n)
constexprstring(const string & str)
constexprstring(string && str)
string &operator=(const string & str)
string &operator=(string && str)
string &operator=(const char * str)
char &operator[](const size_t n)
const charoperator[](const size_t n) const
char &at(const size_t n)
const charat(const size_t n) const
char &front()
const charfront() const
char &back()
const charback() const
char *data()
const char *data() const
const char *c_str() const
char *begin()
const char *cbegin() const
char *end()
const char *cend() const
boolempty() const
size_tsize() const
size_tlength() const
size_tcapacity() const
size_tmax_size() const
voidreserve(const size_t n)
voidshrink_to_fit()
voidclear()
voidresize(const size_t n)
voidswap(string & str)
voidpush_back(const char c)
voidpop_back()
stringsubstr(size_t pos =0, size_t len =npos) const
size_tcopy(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)
voidprint() const

Public Attributes

Name
constexpr size_tnpos

Friends

Name
booloperator<(const string & lhs, const string & rhs)
booloperator>(const string & lhs, const string & rhs)
booloperator<=(const string & lhs, const string & rhs)
booloperator>=(const string & lhs, const string & rhs)
booloperator==(const string & lhs, const string & rhs)
booloperator!=(const string & lhs, const string & rhs)
stringoperator+(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