Contents

initWithFormat:locale:

Returns an NSString object initialized by using a given format string as a template into which the remaining argument values are substituted according to given locale.

Declaration

- (instancetype) initWithFormat:(NSString *) format locale:(id) locale;

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.

  • locale:

    An Nslocale object specifying the locale to use. To use the current locale, pass [NSLocale currentLocale]. To use the system locale, pass nil.

    For legacy support, this may be an instance of NSDictionary containing locale information.

Discussion

Pass comma-separated list of trailing variadic arguments to substitute into format.

Invokes init(format:locale:arguments:) with locale as the locale.

See Also

Creating and Initializing Strings