Build a map from the list of characters.
Each byte in the output map contains either
-1 if the corresponding character was not present in the input string, or the offset of the last instance of the character in the list.
Definition at line 27 of file buildmap.c.
Referenced by str_countof(), str_findnextof(), and str_findprevof().
for (i = 0; i < 256; i++)
map[i] = -1;
for (i = 0; *list; i++, list++)
map[*(unsigned char*)list] = i;