---
title: string()
framework: webkit
role: symbol
role_heading: Instance Method
path: webkit/webdocumenttext/string()
---

# string()

Returns the entire content of the web document as a string.

## Declaration

```swift
func string() -> String!
```

## Return Value

Return Value The entire content of the web document.

## See Also

### Related Documentation

- [WebKit Objective-C Programming Guide](apple-archive/documentation/Cocoa/Conceptual/DisplayWebContent.md)

### Getting document content

- [attributedString()](webkit/webdocumenttext/attributedstring().md)
