We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert a boolean value to Objective-C string.
将BOOL值转换成Objective-C字符串
NSString *string = NSStringFromBool(BOOL x); // x = YES, string = @"1" // x = NO, string = @"0"
Convert a float value to Objective-C string.
将float类型转换成Objective-C字符串
NSString *string = NSStringFromFloat(float x); // x = 1, string = @"1" // x = 3.14, string = @"3.14"
Convert a CGFloat value to Objective-C string.
将CGFloat类型转换成Objective-C字符串
NSString *string = NSStringFromCGFloat(CGFloat x); // x = 1, string = @"1" // x = 3.14, string = @"3.14"
Convert a int / NSInteger / NSUInteger to Objective-C string.
将int类型、NSInteger类型、NSUInteger类型转换成Objective-C字符串
NSString *string1 = NSStringFromInt(int x); NSString *string2 = NSStringFromNSInteger(int x); NSString *string3 = NSStringFromNSUInteger(int x); // x = 1, string1 = @"1", string2 = @"1", string3 = @"1"
Convert a pointer to Objective-C string.
将id类型指针地址转换成Objective-C字符串
NSString *string = NSStringFromPointer(id x); // string may be anything like @"0x10b70a5c0"...
Convert a percent to Objective-C string.
将百分比数值(float,取值0~1)转换成Objective-C字符串
NSString *string = NSStringFromPercent(id x); // x < 0 or x = 0, string = @"0%" // x = 0.123, string = @"12.3%" // x > 1 or x = 1, string = @"100%"
Convert a ASCII value to Objective-C string.
将单个ASCII码转换成Objective-C字符串
NSString *string = NSStringFromASCIIValue(id x); // x = 32, string = @" " // x = 48, string = @"0" // x = 65, string = @"A" // x = 90, string = @"Z" // x = 97, string = @"a" // x = 122, string = @"z"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
NSStringFromBool
Convert a boolean value to Objective-C string.
将BOOL值转换成Objective-C字符串
NSStringFromFloat
Convert a float value to Objective-C string.
将float类型转换成Objective-C字符串
NSStringFromCGFloat
Convert a CGFloat value to Objective-C string.
将CGFloat类型转换成Objective-C字符串
NSStringFromInt / NSInteger / NSUInteger
Convert a int / NSInteger / NSUInteger to Objective-C string.
将int类型、NSInteger类型、NSUInteger类型转换成Objective-C字符串
NSStringFromPointer
Convert a pointer to Objective-C string.
将id类型指针地址转换成Objective-C字符串
NSStringFromPercent
Convert a percent to Objective-C string.
将百分比数值(float,取值0~1)转换成Objective-C字符串
NSStringFromASCIIValue
Convert a ASCII value to Objective-C string.
将单个ASCII码转换成Objective-C字符串
The text was updated successfully, but these errors were encountered: