---
title: "init(string:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/nsstring/init(string:)-210xa"
---

# init(string:)

Returns an NSString object initialized by copying the characters from another given string.

## Declaration

```swift
convenience init(string aString: String)
```

## Parameters

- `aString`: The string from which to copy characters. This value must not be nil. important: Raises an NSInvalidArgumentException if aString is nil.

## Return Value

Return Value An NSString object initialized by copying the characters from aString. The returned object may be different from the original receiver.

## 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(format:arguments:)](foundation/nsstring/init(format:arguments:).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)
