17#include "MantidKernel/DllConfig.h"
33 TOK_IGNORE_FINAL_EMPTY_TOKEN = 4
36 using Iterator = std::vector<std::string>::iterator;
41 StringTokenizer(
const std::string &str,
const std::string &separators,
unsigned options = 0);
98 const std::string &
at(std::size_t
index)
const {
return m_tokens.at(
index); }
110 std::size_t
count()
const {
return m_tokens.size(); }
115 std::size_t
size() const noexcept {
return m_tokens.size(); }
std::map< DeltaEMode::Type, std::string > index
const std::string & at(std::size_t index) const
Get a const reference to the index'th token.
const std::string & operator[](std::size_t index) const
Get a const reference to the index'th token.
Iterator begin()
Iterator referring to first element in the container.
std::vector< std::string > TokenVec
Options
Specify tokenizer options. These can be combined using + or |.
std::vector< std::string >::const_iterator ConstIterator
std::size_t size() const noexcept
Get the total number of tokens.
std::vector< std::string > m_tokens
Iterator end()
Iterator referring to the past-the-end element in the container.
std::string & operator[](std::size_t index)
Get a const reference to the index'th token.
std::vector< std::string >::iterator Iterator
ConstIterator cend() const
Const iterator referring to the past-the-end element in the container.
std::string & at(std::size_t index)
Get a reference to the index'th token.
~StringTokenizer()=default
Destroys the tokenizer.
StringTokenizer()=default
Constructs an object from an empty string.
ConstIterator cbegin() const
Const iterator referring to first element in the container.
const TokenVec & asVector()
Returns a vector of tokenized strings.
ConstIterator begin() const
Const iterator referring to first element in the container.
ConstIterator end() const
Const iterator referring to the past-the-end element in the container.
std::size_t count() const
Get the total number of tokens.
Helper class which provides the Collimation Length for SANS instruments.