<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/ListFormatter/string(from:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSListFormatter(im)stringFromItems:"
  },
  "title" : "string(from:)"
}
-->

# string(from:)

Creates a formatted string for an array of items.

```
func string(from items: [Any]) -> String?
```

## Parameters

`items`

An array of objects to format as a list.

## Return Value

A formatted string representing the list of objects in an array. Returns `nil` if the formatter can’t generate a description for all objects in the array, or if `obj` is `nil`.

## Discussion

The list formatter uses [`itemFormatter`](/documentation/Foundation/ListFormatter/itemFormatter) to format each item in the array. If [`itemFormatter`](/documentation/Foundation/ListFormatter/itemFormatter) doesn’t apply to a particular item, the list formatter falls back to the item’s [`description(withLocale:)`](/documentation/Foundation/NSArray/description(withLocale:)) or [`localizedDescription`](/documentation/Foundation/Progress/localizedDescription) if implemented. If those methods aren’t implemented, the formatter uses <doc://com.apple.documentation/documentation/ObjectiveC/NSObjectProtocol/description> instead.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)