StringContainsArray
Checks whether a substring or an array of substrings is within a string array(each item will be checked). Supports single strings as well. For example, for substrings ['a','b','c'] in a string 'a' the script will return true.
javascript · Filters And Transformers
Details
| ID | StringContainsArray |
|---|---|
| Language | javascript |
| From Version | 5.0.0 |
| Tags | filter string |
README
Checks whether a substring or an array of substrings is within a string array (each item will be checked). Single strings are also supported. For example, for substrings [‘a’,’b’,’c’] in a string ‘a’ the script will return true.
Script Data
| Name | Description |
|---|---|
| Script Type | javascript |
| Tags | filter, string |
Inputs
| Argument Name | Description |
|---|---|
| left | The string to search in. For example, “string1”. |
| right | The array of substrings to search in the string. For example, [“string1”,”string2”]. |
Outputs
There are no outputs for this script.
commonfields: id: StringContainsArray version: -1 name: StringContainsArray script: '' type: javascript tags: - filter - string comment: | Checks whether a substring or an array of substrings is within a string array(each item will be checked). Supports single strings as well. For example, for substrings ['a','b','c'] in a string 'a' the script will return true. enabled: true args: - name: left description: The string to search in, e.g., "string1" - name: right description: The array of substrings to search in the string, e.g., ["string1","string2"] scripttarget: 0 isllm: false tests: - StringContainsArray_test fromversion: 5.0.0