ConstString

class ReflectExport(reflect) ConstString

A ConstString is a reflected string type which doesn’t own its data.  Usually this is a better type to pass around than to store.

Summary
ConstStringA ConstString is a reflected string type which doesn’t own its data.
Functions
ConstStringconstructs a const string wrapping a c string.
ConstString (default)constructs an empty (“”) const string.
c_strreturns the string as a nul-terminated pointer to const char.
datasame as c_str, but the data method isn’t guaranteed to return nul-terminated data in the other reflect string classes.
lengththe number of non-nul chars in this string.
sizesame as length, for compatibility with std::string.

Functions

ConstString

ConstString(const char *s)

constructs a const string wrapping a c string.

ConstString (default)

ConstString()

constructs an empty (“”) const string.

c_str

const char *c_str() const

returns the string as a nul-terminated pointer to const char.

data

const char *data() const

same as c_str, but the data method isn’t guaranteed to return nul-terminated data in the other reflect string classes.  For example Fragment has <Fragment::data> but not c_str.

length

size_type length() const

the number of non-nul chars in this string.

size

size_type size() const

same as length, for compatibility with std::string.

class ReflectExport(reflect) ConstString
A ConstString is a reflected string type which doesn’t own its data.
ConstString(const char *s)
constructs a const string wrapping a c string.
ConstString()
constructs an empty (“”) const string.
const char *c_str() const
returns the string as a nul-terminated pointer to const char.
const char *data() const
same as c_str, but the data method isn’t guaranteed to return nul-terminated data in the other reflect string classes.
size_type length() const
the number of non-nul chars in this string.
size_type size() const
same as length, for compatibility with std::string.
class ReflectExport(reflect) Fragment
A Fragment is the most basic string type in the reflect string suite.
Close