Function parse_arrays (o2scl_acol)

O2scl : Function List

std::vector<std::string> o2scl_acol::parse_arrays(int n_entries, int *sizes, char *str)

Construct a string vector from the data in n_entries, sizes, and str.

This function operates on an integer n_entries, an array sizes (which has length n_entries) and an array of characters str which has a length equal to the sum of the entries in the array sizes. The sizes array contains the length of each string, and the str array contains the characters in multiple strings, concatenated together to form a single combined string. This function takes the data in these three objects and creates an object of type vector<string> from it, similar to the way that o2scl_hdf::hdf_file::gets_vec() reads a string array from an HDF5 file.

This function is used in o2scl_acol_parse(), o2scl_acol_alias_counts() and o2scl_acol_apply_aliases() .