Objective-C 中的 %@ 和 %ld 是什么意思?
What do %@ and %ld mean in Objective-C?
NSString *expectedURL = [NSString stringWithFormat:@"https://%@:%ld/%@"];
%@
和 %ld
是什么意思?
%@ 用于打印和格式化 Objective-c 个对象的格式说明符。
%ld 用于无符号 64 位整数。即NSInteger.
它们是格式说明符。基本上,其余参数的插入点为 stringWithFormat
.
NSString *expectedURL = [NSString stringWithFormat:@"https://%@:%ld/%@"];
%@
和 %ld
是什么意思?
%@ 用于打印和格式化 Objective-c 个对象的格式说明符。
%ld 用于无符号 64 位整数。即NSInteger.
它们是格式说明符。基本上,其余参数的插入点为 stringWithFormat
.