05. String Format Specifiers

2018-10-29  本文已影响0人  ngugg

相关链接:https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Strings/Articles/formatSpecifiers.html#//apple_ref/doc/uid/TP40004265-SW1

This article summarizes the format specifiers supported by string formatting methods and functions.

Format Specifiers

The format specifiers supported by the NSString formatting methods and CFString formatting functions follow the IEEE printf specification; the specifiers are summarized in Table 1. Note that you can also use the n$ positional specifiers such as %1$@ %2$s. For more details, see the IEEE printf specification. You can also use these format specifiers with the NSLog function.

Table 1 Format specifiers supported by the NSString formatting methods and CFString formatting functions

image.png image.png

Table 2 Length modifiers supported by the NSString formatting methods and CFString formatting functions

未完待续。。。

上一篇 下一篇

猜你喜欢

热点阅读