---
title: "string(forType:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nspasteboarditem/string(fortype:)"
---

# string(forType:)

Returns the value for the specified type as a string.

## Declaration

```swift
func string(forType type: NSPasteboard.PasteboardType) -> String?
```

## Parameters

- `type`: A uniform type identifier string.

## Return Value

Return Value The value for the specified type as a string.

## See Also

### Getting values

- [data(forType:)](appkit/nspasteboarditem/data(fortype:).md)
- [propertyList(forType:)](appkit/nspasteboarditem/propertylist(fortype:).md)
