Add randStr implementation.