Swift:
let string = “123456”
let firstStr = string.first//“1”
OC:
NSString *string = @“123456”
NSString* firstStr = [string substringToIndex:1];// “1”
标签:
iOS 获取第一个字符串
Swift:
let string = “123456”
let firstStr = string.first//“1”
OC:
NSString *string = @“123456”
NSString* firstStr = [string substringToIndex:1];// “1”