大家好,我是知秋君,一个会写博客吟诗的知秋码农。今天说一说ios 获取随机字符串信息_lua随机字符串,希望能够帮助大家进步!!!-(NSString *)getRandomStr
{
char data[6];
for (int x=0;x < 6;data[x++] = (char)('A' + (arc4random_uniform(26))));
NSString *randomStr = [[NSString alloc] initWithBytes:data length:6 encoding:NSUTF8StringEncoding];
NSString *string = [NSString stringWithFormat:@"%@",randomStr];
DLog(@"获取随机字符串 %@",string);
return string;
}