47 ONIXS_ESPEED_ITCH_CONSTEXPR
50 : items_(ONIXS_ESPEED_ITCH_NULLPTR)
66 template <
size_t Size>
68 ONIXS_ESPEED_ITCH_CONSTEXPR
79 const std::string&
string)
81 : items_(
string.c_str())
82 , size_(
string.
size())
93 : items_(other.items_)
98 #if defined(ONIXS_ESPEED_ITCH_COMPILER_CXX_RVALUE_REFERENCES) && ONIXS_ESPEED_ITCH_COMPILER_CXX_RVALUE_REFERENCES 100 ONIXS_ESPEED_ITCH_CONSTEXPR
104 : items_(std::move(other.items_))
105 , size_(std::move(other.size_))
115 items_ = std::move(other.items_);
116 size_ = std::move(other.size_);
155 return (items_ + size_);
162 reset(ONIXS_ESPEED_ITCH_NULLPTR, 0);
180 return items_[index];
188 return items_[index];
190 throw std::invalid_argument(
"index");
199 items_ = other.items_;
211 std::swap(items_, other.items_);
212 std::swap(size_, other.size_);
219 size_t length =
size();
221 while(length > 0 && isspace(
operator[](length - 1)))
239 const std::string& str)
241 return StrRef(str.data(), str.size());
265 return std::string(ref.
items(), ref.
size());
284 return std::string(1, character);
294 str.append(1, character);
302 const std::string& value)
328 return !(left == right);
336 const std::string& str)
346 const std::string& str)
355 const std::string& str,
365 const std::string& str,
427 if (0 == compareResult)
430 static_cast<ptrdiff_t
>(
434 return (0 > compareResult);
444 return (right < left);
451 std::ostream& stream,
#define ONIXS_ESPEED_ITCH_NAMESPACE_END
bool operator<(const StrRef &left, const StrRef &right)
Establishes order over string refs.
#define ONIXS_ESPEED_ITCH_NAMESPACE_BEGIN
void swap(StrRef &other) ONIXS_ESPEED_ITCH_NOTHROW
Swaps content with other instance.
std::ostream & operator<<(std::ostream &stream, const StrRef &text)
StrRef serialization operator.
StrRef trim() const ONIXS_ESPEED_ITCH_NOTHROW
void reset() ONIXS_ESPEED_ITCH_NOTHROW
Resets reference to nothing.
StrRef toStrRef(const std::string &str)
Constructs StrRef instance over std::string content.
std::string toStr(const StrRef &ref)
Constructs std::string instance from StrRef one.
bool operator!=(const StrRef &left, const StrRef &right)
Compares with another instance.
const Char * items() const ONIXS_ESPEED_ITCH_NOTHROW
Read-only content.
ONIXS_ESPEED_ITCH_NAMESPACE_BEGIN typedef char Char
Character type alias.
bool operator>(const StrRef &left, const StrRef &right)
Establishes order over string refs.
const Char & operator[](size_t index) const
bool empty() const ONIXS_ESPEED_ITCH_NOTHROW
Indicates whether array of zero length.
const Char & at(size_t index) const
ONIXS_ESPEED_ITCH_CONSTEXPR StrRef(const char(&value)[Size]) ONIXS_ESPEED_ITCH_NOTHROW
Full initialization.
size_t size() const ONIXS_ESPEED_ITCH_NOTHROW
Number of chars.
ONIXS_ESPEED_ITCH_CONSTEXPR StrRef() ONIXS_ESPEED_ITCH_NOTHROW
Initializes blank instance.
Iterator begin() const ONIXS_ESPEED_ITCH_NOTHROW
STL-like begin().
StrRef(const std::string &string) ONIXS_ESPEED_ITCH_NOTHROW
Full initialization.
void reset(const Char *chars, size_t size) ONIXS_ESPEED_ITCH_NOTHROW
Updates data being referenced.
StrRef(const Char *chars, size_t size) ONIXS_ESPEED_ITCH_NOTHROW
Full initialization.
Provides efficient way of accessing text-based FIX field values.
Iterator end() const ONIXS_ESPEED_ITCH_NOTHROW
STL-like end().
#define ONIXS_ESPEED_ITCH_NOTHROW
bool operator==(const StrRef &left, const StrRef &right)
Compares StrRef instance with another one.
StrRef(const StrRef &other) ONIXS_ESPEED_ITCH_NOTHROW
const Char * Iterator
STL-like iterator.
StrRef & operator=(const StrRef &other) ONIXS_ESPEED_ITCH_NOTHROW
Reinitializes from another instance.