Chapter B1
Functions Alphabetically

Here the functions are listed alphabetically within each section.

B1.1 Miscellaneous Functions

Util_CurrentDate

[B15] Fills string with current local date

Util_CurrentDateTime

[B16] Returns the current datetime in a machine-processable format as defined in ISO 8601 chapter 5.4.

Util_CurrentTime

[B18] Fills string with current local time

Util_snprintf

[B20] Deprecated; use snprintf instead.

Util_vsnprintf

[B21] Deprecated; use vsnprintf instead.

Util_asprintf

[B21] Sprintf with memory allocation. On input the buffer should point to a NULL area of memory.

B1.2 String Functions

Util_StrCmpi

[B24] Compare two strings, ignoring upper/lower case.

Util_Strdup

[B30] Deprecated; use strdup instead.

Util_Strlcat

[B30] Concatenate two strings safely.

Util_Strlcpy

[B34] Copy a string safely.

Util_StrSep

[B39] Separate first token from a string.

B1.3 Table Functions

Util_TableClone

[B46] Create a new table which is a “clone” (exact copy) of an existing table

Util_TableCreate

[B51] Create a new (empty) table

Util_TableCreateFromString

[B55] Create a new table (with the case-insensitive flag set) and sets values in it based on a string argument (interpreted with “parameter-file” semantics)

Util_TableDeleteKey

[B59] Delete a specified key/value entry from a table

Util_TableDestroy

[B61] Destroy a table

Util_TableGet*

[B65] This is a family of functions, one for each Cactus data type, to get the single (1-element array) value, or more generally the first array element of the value, associated with a specified key in a key/value table.

Util_TableGet*Array

[B69] This is a family of functions, one for each Cactus data type, to get a copy of the value associated with a specified key, and store it (more accurately, as much of it as will fit) in a specified array

Util_TableGetGeneric

[B73] Get the single (1-element array) value, or more generally the first array element of the value, associated with a specified key in a key/value table; the value’s data type is generic

Util_TableGetGenericArray

[B77] Get a copy of the value associated with a specified key, and store it (more accurately, as much of it as will fit) in a specified array; the array’s data type is generic

Util_TableGetString

[B81] Gets a copy of the character-string value associated with a specified key in a table, and stores it (more accurately, as much of it as will fit) in a specified character string

Util_TableItAdvance

[B84] Advance a table iterator to the next entry in the table

Util_TableItClone

[B86] Creates a new table iterator which is a “clone” (exact copy) of an existing table iterator

Util_TableItCreate

[B90] Create a new table iterator

Util_TableItDestroy

[B92] Destroy a table iterator

Util_TableItQueryIsNonNull

[B94] Query whether a table iterator is not in the “null-pointer” state

Util_TableItQueryIsNull

[B97] Query whether a table iterator is in the “null-pointer” state

Util_TableItQueryKeyValueInfo

[B100] Query the key and the type and number of elements of the value corresponding to that key, of the table entry to which an iterator points

Util_TableItQueryTableHandle

[B104] Query what table a table iterator iterates over

Util_TableItResetToStart

[B106] Reset a table iterator to point to the starting table entry

Util_TableItSetToKey

[B108] Set a key/value iterator to point to a specified entry in the table.

Util_TableItSetToNull

[B110] Set a key/value iterator to the “null-pointer” state.

Util_TableQueryFlags

[B112] Query a table’s flags word

Util_TableQueryValueInfo

[B115] Query whether or not a specified key is in the table, and optionally the type and/or number of elements of the value corresponding to this key

Util_TableQueryMaxKeyLength

[B119] Query the maximum key length in a table

Util_TableQueryNKeys

[B123] Query the number of key/value entries in a table

Util_TableSet*

[B125] This is a family of functions, one for each Cactus data type, to set the value associated with a specified key to be a specified single (1-element array) value

Util_TableSet*Array

[B129] This is a family of functions, one for each Cactus data type, to set the value associated with a specified key to be a copy of a specified array

Util_TableSetFromString

[B133] Sets values in a table based on a string argument (interpreted with “parameter-file” semantics)

Util_TableSetGeneric

[B138] Set the value associated with a specified key to be a specified single (1-element array) value, whose data type is generic

Util_TableSetGenericArray

[B142] Set the value associated with a specified key to be a copy of a specified array, whose data type is generic

Util_TableSetString

[B146] Sets the value associated with a specified key in a table, to be a copy of a specified C-style null-terminated character string

Util_TablePrint

[B151] Print out a table and its data structures, using a verbose internal format meant for debugging

Util_TablePrintAll

[B153] Print out all tables and their data structures, using a verbose internal format meant for debugging

Util_TablePrintAllIterators

[B155] Print out all table iterators and their data structures, using a verbose internal format meant for debugging

Util_TablePrintPretty

[B157] Print out a table, using a human-readable format similar to the one accepted by Util_TableCreateFromString