---
title: allTokens()
framework: cloudkit
role: symbol
role_heading: Instance Method
path: cloudkit/ckrecord/alltokens()
---

# allTokens()

Returns an array of strings to use for full-text searches of the field’s string-based values.

## Declaration

```swift
func allTokens() -> [String]
```

## Return Value

Return Value An array of strings that contains data from the record’s string-based fields.

## Discussion

Discussion When performing your own full-text searches, you can use this method to get a list of strings for your search. The method acts only on keys with string values. It breaks each value string apart at whitespace boundaries, creates new strings for each word, adds the new strings to an array, and returns the array. This tokenized version of the record’s string values makes it easier to do string-based comparisons of individual words.
