Typedefs | |
typedef lub_argv_s | lub_argv_t |
Functions | |
unsigned | lub_argv_wordcount (const char *line) |
lub_argv_t * | lub_argv_new (const char *line, size_t offset) |
void | lub_argv_delete (lub_argv_t *instance) |
unsigned | lub_argv__get_count (const lub_argv_t *instance) |
const char * | lub_argv__get_arg (const lub_argv_t *instance, unsigned index) |
size_t | lub_argv__get_offset (const lub_argv_t *instance, unsigned index) |
bool_t | lub_argv__get_quoted (const lub_argv_t *instance, unsigned index) |
void | lub_argv__set_arg (lub_argv_t *instance, unsigned index, const char *arg) |
A word is either separated by whitespace, or if quotes are used a word is defined by the scope of the quotes.
e.g.
one two "this is the third word" four
typedef struct lub_argv_s lub_argv_t |
This type is used to reference an instance of an argument vector
lub_argv_t* lub_argv_new | ( | const char * | line, | |
size_t | offset | |||
) |
This operation is used to construct an instance of this class. The client species a string and an offset within that string, from which to start collecting "words" to place into the vector instance.
line | The string to analyse |
offset | The offset in the string to start from |
unsigned lub_argv_wordcount | ( | const char * | line | ) |
line | The string to analyse |