Function util_string_gen

Function Documentation

status_t util_string_gen(char *buf, size_t len)

Generate a random alpha-numeric string of known length.

Buf is filled with len - 1 alpha-numeric characters and a NULL byte at the end such that strlen(buf) = len -1 after this function executes.

Parameters:
  • buf – The buffer to fill.

  • len – The # of characters to put in the string, -1 for the NULL byte.

Returns:

status_t.