---
title: "description(withLocale:indent:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsorderedset/description(withlocale:indent:)"
---

# description(withLocale:indent:)

Returns a string that represents the contents of the ordered set, formatted as a property list.

## Declaration

```swift
func description(withLocale locale: Any?, indent level: Int) -> String
```

## Parameters

- `locale`: An doc://com.apple.foundation/documentation/Foundation/NSLocale object or an NSDictionary object that specifies options used for formatting each of the array’s elements (where recognized). Specify nil if you don’t want the elements formatted.
- `level`: Specifies a level of indentation, to make the output more readable: the indentation is (4 spaces) * level.

## Return Value

Return Value A string that represents the contents of the ordered set, formatted as a property list.

## Discussion

Discussion The returned NSString object contains the string representations of each of the ordered set’s elements, in order, from first to last. To obtain the string representation of a given element, descriptionWithLocale:indent: proceeds as follows: If the element is an NSString object, it is used as is. If the element responds to descriptionWithLocale:indent:, that method is invoked to obtain the element’s string representation. If the element responds to descriptionWithLocale:, that method is invoked to obtain the element’s string representation. If none of the above conditions is met, the element’s string representation is obtained by invoking its description method

## See Also

### Describing a Set

- [description](foundation/nsorderedset/description.md)
- [description(withLocale:)](foundation/nsorderedset/description(withlocale:).md)
