Contents

init(format:arguments:)

Returns an NSString object initialized by using a given format string as a template into which the remaining argument values are substituted without any localization.

Declaration

convenience init(format: String, arguments argList: CVaListPointer)

Parameters

  • format:

    A format string. See 20000943 for examples of how to use this method, and TP40004265 for a list of format specifiers. This value must not be nil.

  • argList:

    A list of arguments to substitute into format.

Return Value

An NSString object initialized by using format as a template into which the values in argList are substituted according to the current locale. The returned object may be different from the original receiver.

Discussion

This method is meant to be called from within a variadic function, where the argument list will be available.

This method invokes init(format:locale:arguments:) without applying any localization. This is useful, for example, when working with fixed-format representations of information that is written out and read back in at a later time.

See Also

Creating and Initializing Strings