StringFilterBuilder

A builder for string filter controls.

A string filter is a simple text input field that lets the user filter data via string
matching. Given a column of type string and matching options, this control filters out the rows
that don't match the term that's in the input field.

For more details, see the Gviz [documentation](https://developers.google.com/chart/interactive/docs/gallery/controls#stringfilter).

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/charts/string-filter-builder#setCaseSensitive(Boolean)` | `https://developers.google.com/apps-script/reference/charts/string-filter-builder#` | Sets whether matching should be case sensitive or not. |
| `https://developers.google.com/apps-script/reference/charts/string-filter-builder#setMatchType(MatchType)` | `https://developers.google.com/apps-script/reference/charts/string-filter-builder#` | Sets whether the control should match exact values only (`https://developers.google.com/apps-script/reference/charts/match-type#EXACT`), prefixes starting from the beginning of the value (`https://developers.google.com/apps-script/reference/charts/match-type#PREFIX`), or any substring (`https://developers.google.com/apps-script/reference/charts/match-type#ANY`). |
| `https://developers.google.com/apps-script/reference/charts/string-filter-builder#setRealtimeTrigger(Boolean)` | `https://developers.google.com/apps-script/reference/charts/string-filter-builder#` | Sets whether the control should match any time a key is pressed or only when the input field 'changes' (loss of focus or pressing the Enter key). |

## Detailed documentation

### `setCaseSensitive(caseSensitive)`

Sets whether matching should be case sensitive or not.

```javascript
// Builds a case insensitive string filter to filter column "Col1".
const stringFilter = Charts.newStringFilter()
                         .setFilterColumnLabel('Col1')
                         .setCaseSensitive(false)
                         .build();
```

#### Parameters

| Name | Type | Description |
|---|---|---|
| `caseSensitive` | `Boolean` | If `true`, enables string matching case sensitivity. |

#### Return


`https://developers.google.com/apps-script/reference/charts/string-filter-builder#` --- This builder, useful for chaining.

*** ** * ** ***

### `setMatchType(matchType)`

Sets whether the control should match exact values only (`https://developers.google.com/apps-script/reference/charts/match-type#EXACT`), prefixes
starting from the beginning of the value (`https://developers.google.com/apps-script/reference/charts/match-type#PREFIX`), or any substring
(`https://developers.google.com/apps-script/reference/charts/match-type#ANY`).

```javascript
// Builds a string filter to filter column "Col1" matching the prefix.
const stringFilter = Charts.newStringFilter()
                         .setFilterColumnLabel('Col1')
                         .setMatchType(Charts.MatchType.PREFIX)
                         .build();
```

#### Parameters

| Name | Type | Description |
|---|---|---|
| `matchType` | `https://developers.google.com/apps-script/reference/charts/match-type` | The string matching type. |

#### Return


`https://developers.google.com/apps-script/reference/charts/string-filter-builder#` --- This builder, useful for chaining.

#### See also

- `https://developers.google.com/apps-script/reference/charts/match-type`

*** ** * ** ***

### `setRealtimeTrigger(realtimeTrigger)`

Sets whether the control should match any time a key is pressed or only when the input field
'changes' (loss of focus or pressing the Enter key).

```javascript
// Builds a string filter to filter column "Col1" that checks the match any time
// a key is pressed.
const stringFilter = Charts.newStringFilter()
                         .setFilterColumnLabel('Col1')
                         .setRealtimeTrigger(true)
                         .build();
```

#### Parameters

| Name | Type | Description |
|---|---|---|
| `realtimeTrigger` | `Boolean` | If `true`, sets events to be triggered at real time (when a key is pressed). |

#### Return


`https://developers.google.com/apps-script/reference/charts/string-filter-builder#` --- This builder, useful for chaining.