Customized function can be written using rand(). strnlen Returns the number of characters in the string, not including the terminating \0 character, but at most maxien. size_t strlen (const char *s) BSD String and Bit Functions String interfaces specified by ANSI/ISO C and found only in the Single UNIX Specification are in string.h.