Creation/destruction/manipulation API for LALStringVector
objects, which are just LAL-type vectors of CHAR * pointers.
Prototypes | |
LALStringVector * | XLALCreateStringVector (const CHAR *str1,...) |
Create a StringVector from the list of strings passed as arguments. More... | |
LALStringVector * | XLALCreateEmptyStringVector (UINT4 length) |
Create an empty string vector of the given length. More... | |
LALStringVector * | XLALCopyStringVector (const LALStringVector *vect) |
Create a copy of a string vector. More... | |
LALStringVector * | XLALAppendString2Vector (LALStringVector *vect, const CHAR *string) |
Append the given string to the string-vector (XLAL interface), return pointer to the resulting string-vector, or NULL on error. More... | |
void | XLALDestroyStringVector (LALStringVector *vect) |
XLAL-interface: Free a string-vector ;) More... | |
char * | XLALConcatStringVector (const LALStringVector *strings, const char *sep) |
Concatenate a string vector 'strings', separated by the string 'sep', into a single string. More... | |
LALStringVector * | XLALParseStringVector (const char *string, const char *delim) |
Parse 'string' into a string vector of tokens, delimited by the characters 'delim'. More... | |
int | XLALSortStringVector (LALStringVector *strings) |
Sort string-vector alphabetically in place More... | |
INT4 | XLALFindStringInVector (const char *needle, const LALStringVector *haystack) |
Search for string 'needle' in string-vector 'haystack', return index to first matching vector element if found, -1 outherwise. More... | |
char * | XLALDeblankString (const char *start, UINT4 len) |
Copy (and allocate) string from 'start' with length 'len', removing all starting- and trailing blanks! More... | |
Files | |
file | StringVectorTest.c |
LALStringVector* XLALCreateStringVector | ( | const CHAR * | str1, |
... | |||
) |
Create a StringVector from the list of strings passed as arguments.
Definition at line 100 of file StringVector.c.
LALStringVector* XLALCreateEmptyStringVector | ( | UINT4 | length | ) |
Create an empty string vector of the given length.
Definition at line 164 of file StringVector.c.
LALStringVector* XLALCopyStringVector | ( | const LALStringVector * | vect | ) |
Create a copy of a string vector.
Definition at line 189 of file StringVector.c.
LALStringVector* XLALAppendString2Vector | ( | LALStringVector * | vect, |
const CHAR * | string | ||
) |
Append the given string to the string-vector (XLAL interface), return pointer to the resulting string-vector, or NULL on error.
vect | input string-vector to append to |
string | string to append |
Definition at line 47 of file StringVector.c.
void XLALDestroyStringVector | ( | LALStringVector * | vect | ) |
XLAL-interface: Free a string-vector ;)
Definition at line 204 of file StringVector.c.
char* XLALConcatStringVector | ( | const LALStringVector * | strings, |
const char * | sep | ||
) |
Concatenate a string vector 'strings', separated by the string 'sep', into a single string.
Definition at line 246 of file StringVector.c.
LALStringVector* XLALParseStringVector | ( | const char * | string, |
const char * | delim | ||
) |
Parse 'string' into a string vector of tokens, delimited by the characters 'delim'.
Definition at line 280 of file StringVector.c.
int XLALSortStringVector | ( | LALStringVector * | strings | ) |
Sort string-vector alphabetically in place
Definition at line 312 of file StringVector.c.
INT4 XLALFindStringInVector | ( | const char * | needle, |
const LALStringVector * | haystack | ||
) |
Search for string 'needle' in string-vector 'haystack', return index to first matching vector element if found, -1 outherwise.
Note: function allows haystack=NULL input, in which case -1 (=not found) will be returned.
Definition at line 370 of file StringVector.c.
char* XLALDeblankString | ( | const char * | start, |
UINT4 | len | ||
) |
Copy (and allocate) string from 'start' with length 'len', removing all starting- and trailing blanks!
Definition at line 330 of file StringVector.c.