79 chars_ (other.chars_),
87 chars_ (stdStr.c_str() ),
88 size_ (stdStr.size() )
95 size_ (cStr ? strlen (cStr) : 0)
120 return chars_ + size_;
146 operator [] (
size_t index)
const 148 return chars_[index];
152 at (
size_t index)
const 155 return chars_[index];
157 throw std::invalid_argument (
"index");
177 str.append (chars_, size_);
184 return std::string (chars_, size_);
196 chars_, other.chars_, size_) );
208 chars_, other.chars_, size_) );
216 chars_ = other.chars_;
226 std::swap (chars_, other.chars_);
227 std::swap (size_, other.size_);
242 const std::string& str)
251 const std::string& str)
259 const std::string& str,
268 const std::string& str,
329 compareResult = memcmp (
334 if (0 == compareResult)
337 static_cast<ptrdiff_t
> (
341 return (0 > compareResult);
static bool tryParse(const char *buffer, size_t bufferSize, Int32 &number)
void reset()
Resets reference to nothing.
void reset(const char *chars, size_t size)
Updates data being referenced.
bool operator==(const FieldValueRef &ref, const std::string &str)
Allows using of StringRef in collections like std::map.
#define ONIXS_EUREX_EMDI_NULLPTR
StringRef(const StringRef &other)
bool empty() const
Indicates whether array of zero length.
const char * data() const
Read-only content.
const char * ConstIterator
Immutable iterator over chars.
ConstIterator begin() const
STL-like begin().
std::string toString() const
StringRef(const char *chars, size_t size)
Full initialization.
StringRef(const std::string &stdStr)
Initializes instance from string content.
void swap(StringRef &other)
Swaps content with other instance.
StringRef()
Initializes blank instance.
bool operator!=(const FieldValueRef &ref, const std::string &str)
void toString(std::string &str) const
StringRef(const char *cStr)
Initializes instance from zero-terminated string.
bool toNumber(NumericType &number) const
const char & at(size_t index) const
size_t size() const
Number of chars.
ConstIterator end() const
STL-like end().