Function strings_spec (o2scl_hdf)¶
-
template<class vec_t>
int o2scl_hdf::strings_spec(std::string spec, vec_t &v, int verbose = 0, bool err_on_fail = true)¶ Specification of several strings.
Some acol commands take arguments which are ‘string list specifications’. The different parts of the string are separated by a colon, and the first part specifes the type of vector specification. The different types are:
list:<comma-separated list> - A list of strings
shell:<command> - The lines obtained from the result of a shell command, with a maximum of 256 characters per line.
pattern:N:x[0][a][A] - The N strings obtained from a pattern. Occurrences of [0] are replaced with the integer ‘i’ where i runs from 0 to N-1. Occurrences of [a] are replaced with ‘a’ through ‘z’ from 0 through 25, and ‘aa’ through ‘zz’ for i from 26 to 701. Occurrences of [A] are replaced with ‘A’ through ‘Z’ from 0 through 25, and ‘AA’ through ‘ZZ’ for i from 26 to 701.
text:<filename> - The lines in the text file.
hdf5: - Unfinished.
This function is used for the acol slack command.
End of runtime documentation.
Note
Previous strings in
v
are left unchanged and new strings are just added to the end.Warning
Experimental.