strnlen

fnsize_t strnlen(scope const char * str, size_t maxlen) pure;

Find length of string up to maxlen