12 #ifndef ROC_CORE_STRING_LIST_H_
13 #define ROC_CORE_STRING_LIST_H_
63 const char*
nextof(
const char* str)
const;
71 const char*
prevof(
const char* str)
const;
101 enum { MinCapacity = 128 };
112 void check_member_(
const char* str)
const;
113 bool grow_(
size_t size);
115 core::Array<char> data_;
#define ROC_ATTR_NODISCARD
Emit warning if function result is not checked.
Base class for non-copyable objects.
const char * back() const
Get last string.
const char * nextof(const char *str) const
Get next string.
bool is_empty() const
Check if list is empty.
const char * front() const
Get first string.
ROC_ATTR_NODISCARD const char * find(const char *str_begin, const char *str_end)
Find string in the list.
void clear()
Clear the list.
const char * prevof(const char *str) const
Get previous string.
ROC_ATTR_NODISCARD bool push_back(const char *str)
Append string to the list.
StringList(IArena &arena)
Initialize empty string list.
ROC_ATTR_NODISCARD const char * find(const char *str)
Find string in the list.
ROC_ATTR_NODISCARD bool push_back(const char *str_begin, const char *str_end)
Append string from a range to the list.
size_t size() const
Get number of elements.
@ Header
PayloadID comes before payload.
@ Footer
PayloadID comes after payload.
Commonly used types and functions.