<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSStringFromMapTable(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@F@NSStringFromMapTable"
  },
  "title" : "NSStringFromMapTable(_:)"
}
-->

# NSStringFromMapTable(_:)

Returns a string describing the map table’s contents.

```
func NSStringFromMapTable(_ table: NSMapTable<AnyObject, AnyObject>) -> String
```

## Parameters

`table`

A reference to a map table structure.

## Return Value

A string describing the map table’s contents.

## Discussion

The function iterates over the key-value pairs of `table` and for each one appends the string “a = b;\n”, where a and b are the key and value strings returned by the corresponding `describe` callback functions. If `NULL` was specified for the callback function, a and b are the key and value pointers, expressed as hexadecimal numbers.

---

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)