74 : items_(other.items_)
106 return (items_ + size_);
131 return items_[index];
140 return items_[index];
142 throw std::invalid_argument(
"index");
150 items_ = other.items_;
175 const std::string& str)
177 return StrRef(str.data(), str.size());
201 return std::string(ref.
items(), ref.
size());
220 return std::string(1, character);
230 str.append(1, character);
238 const std::string&
value)
264 return !(left == right);
272 const std::string& str)
282 const std::string& str)
291 const std::string& str,
301 const std::string& str,
365 0 != result ? (0 > result)
377 return (right < left);
384 std::ostream& stream,
const Char & at(size_t index) const
Provides bound-checked per-item access.
StrRef(const Char *chars, size_t size)
Explicit reference initialization.
void reset()
Resets the reference to nothing.
bool operator>(const StrRef &left, const StrRef &right)
Establishes order over string refs.
Iterator end() const
STL-like end().
bool operator==(const Char *str, const StrRef &ref)
Compares StrRef with zero-terminated/C-like string.
StrRef toStrRef(const Char *cStr)
Initializes instance from zero-terminated/C-like string.
const Char * items() const
Read-only content.
size_t size() const
Number of chars.
void swap(StrRef &other)
Swaps content with the other instance.
char Char
Character type alias.
bool empty() const
Indicates whether the referenced text is empty.
bool operator!=(const Char *str, const StrRef &ref)
Compares StrRef with zero-terminated/C-like string.
#define ONIXS_CONFLATEDUDP_NAMESPACE_END
std::ostream & operator<<(std::ostream &stream, const StrRef &text)
StrRef serialization operator.
StrRef(const StrRef &other)
bool operator<(const StrRef &left, const StrRef &right)
Establishes order over string refs.
void toStr(std::string &str, const std::string &value)
Appends one string another one.
bool value(Number &number, const MultiContainer &container, Tag tag)
void reset(const Char *chars, size_t size)
#define ONIXS_CONFLATEDUDP_LTWT_CLASS
Iterator begin() const
STL-like begin().
StrRef()
Initializes the instance referring to nothing.
#define ONIXS_CONFLATEDUDP_NAMESPACE_BEGIN
const Char * Iterator
STL-like iterator.