ANNA Suite
2020b
Multipurpose development suite for Telco applications
|
#include <Tokenizer.hpp>
Public Types | |
typedef char *const * | const_iterator |
Public Member Functions | |
Tokenizer () | |
Tokenizer (const char *str, const char *separator) | |
Tokenizer (const std::string &str, const char *separator) | |
virtual | ~Tokenizer () |
bool | activateStrip () const |
void | activateStrip (const bool _activateStrip) |
const char * | at (const int i) noexcept(false) |
const char * | at (const int i) const noexcept(false) |
const char * | operator[] (const int i) noexcept(false) |
const char * | operator[] (const int i) const noexcept(false) |
int | apply (const char *str, const char *separator, const char *tokenizeContiguous=NULL) noexcept(false) |
int | apply (const std::string &str, const char *separator, const char *tokenizeContiguous=NULL) noexcept(false) |
const char * | last () const noexcept(false) |
int | size () const |
const_iterator | begin () const |
const_iterator | end () const |
Static Public Member Functions | |
static const char * | data (const_iterator ii) |
Tokenize the input string into several elements
typedef char* const* anna::Tokenizer::const_iterator |
anna::Tokenizer::Tokenizer | ( | ) |
Constructor.
anna::Tokenizer::Tokenizer | ( | const char * | str, |
const char * | separator | ||
) |
Constructor.
str | Cadena sobre la que aplicar la separacion. |
separator | Caracteres que van a actuar como separador de las subcadenas contenidas en el primer parametro. |
anna::Tokenizer::Tokenizer | ( | const std::string & | str, |
const char * | separator | ||
) |
Constructor.
str | Cadena sobre la que aplicar la separacion. |
separator | Caracteres que van a actuar como separador de las subcadenas contenidas en el primer parametro. |
|
virtual |
Destructor.
|
inline |
|
inline |
Activa y/o desactiva que activa el sistema que permite recoger los elementos retornadodos por esta clase sin espacios por delante y por detras.
_activateStrip | Parametro que indica el estado de activacion o desactivacion. |
|
noexcept |
Process the separation over the string str with the separator provided.
Internally used strtok_r has these imitations: sequence of two or more contiguous delimiter bytes in the parsed string is considered to be a single delimiter. Delimiter bytes at the start or end of the string are ignored. Put another way: the tokens returned by strtok() are always nonempty strings. To override these limitations, the string provided can be internally modified inserting a artificial token in order to cheat on strtok_r. For this feature, you may provide '<null>' or whatever string (non-empty) you prefer.
str | String to apply the separation. |
separator | Characters used as separator within the string tokenized |
tokenizeContiguous | If provided, it will be the artificial token used internally. The resulting tokens shall store this string in case of contiguous separators. NULL by default (original strtok_r behaviour). |
|
inlinenoexcept |
|
noexcept |
|
noexcept |
|
inline |
|
inlinestatic |
|
inline |
|
noexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |