---
title: "init(format:arguments:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/nsstring/init(format:arguments:)"
---

# 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

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

## Parameters

- `format`: A format string. See https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Strings/Articles/FormatStrings.html#//apple_ref/doc/uid/20000943 for examples of how to use this method, and https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFStrings/formatSpecifiers.html#//apple_ref/doc/uid/TP40004265 for a list of format specifiers. This value must not be nil. important: Raises an NSInvalidArgumentException if format is nil.
- `argList`: A list of arguments to substitute into format.

## Return Value

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

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. important: When working with text that’s presented to the user, use the localizedStringWithFormat: method, or the initWithFormat:locale: or init(format:locale:arguments:) method, passing current as the locale.

## See Also

### Creating and Initializing Strings

- [init()](foundation/nsstring/init().md)
- [init(bytes:length:encoding:)](foundation/nsstring/init(bytes:length:encoding:).md)
- [init(bytesNoCopy:length:encoding:freeWhenDone:)](foundation/nsstring/init(bytesnocopy:length:encoding:freewhendone:).md)
- [init(characters:length:)](foundation/nsstring/init(characters:length:).md)
- [init(charactersNoCopy:length:freeWhenDone:)](foundation/nsstring/init(charactersnocopy:length:freewhendone:).md)
- [init(string:)](foundation/nsstring/init(string:)-210xa.md)
- [init(format:locale:arguments:)](foundation/nsstring/init(format:locale:arguments:).md)
- [init(data:encoding:)](foundation/nsstring/init(data:encoding:).md)
- [localizedUserNotificationString(forKey:arguments:)](foundation/nsstring/localizedusernotificationstring(forkey:arguments:).md)
- [localizedStringWithFormat(_:_:)](foundation/nsstring/localizedstringwithformat(_:_:).md)
- [unichar](foundation/unichar.md)
