strings2bits()
#
Converts a delimited string of names into a bitmask based on a predefined string table.
Prototype
uint64_t strings2bits(
const char **strings_table,
const char *str,
const char *separators
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
A null-terminated array of strings representing bit positions. |
|
|
A string containing names separated by the specified delimiters. |
|
|
A string containing delimiter characters used to split |
Return Value
A 64-bit bitmask where each bit corresponds to a matched string in strings_table
.
Notes
[‘Each string in str
is matched against strings_table
, and the corresponding bit is set in the returned bitmask.’, ‘If separators
is NULL or empty, the default separators “|, “ are used.’, ‘The function assumes that strings_table
contains at most 64 entries, as it maps each entry to a bit in a uint64_t
.’]
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples