-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathtext_begins.json
92 lines (92 loc) · 2.54 KB
/
text_begins.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
{
"id": "text_begins",
"summary": "Text begins with another text",
"description": "Checks whether the text (also known as *string*) specified for `data` contains the text specified for `pattern` at the beginning. Both are expected to be encoded in UTF-8 by default. The no-data value `null` is passed through and therefore gets propagated.",
"categories": [
"texts",
"comparison"
],
"parameters": [
{
"name": "data",
"description": "Text in which to find something at the beginning.",
"schema": {
"type": [
"string",
"null"
]
}
},
{
"name": "pattern",
"description": "Text to find at the beginning of `data`. Regular expressions are not supported.",
"schema": {
"type": "string"
}
},
{
"name": "case_sensitive",
"description": "Case sensitive comparison can be disabled by setting this parameter to `false`.",
"schema": {
"type": "boolean"
},
"default": true,
"optional": true
}
],
"returns": {
"description": "`true` if `data` begins with `pattern`, false` otherwise.",
"schema": {
"type": [
"boolean",
"null"
]
}
},
"examples": [
{
"arguments": {
"data": "Lorem ipsum dolor sit amet",
"pattern": "amet"
},
"returns": false
},
{
"arguments": {
"data": "Lorem ipsum dolor sit amet",
"pattern": "Lorem"
},
"returns": true
},
{
"arguments": {
"data": "Lorem ipsum dolor sit amet",
"pattern": "lorem"
},
"returns": false
},
{
"arguments": {
"data": "Lorem ipsum dolor sit amet",
"pattern": "lorem",
"case_sensitive": false
},
"returns": true
},
{
"arguments": {
"data": "Ä",
"pattern": "ä",
"case_sensitive": false
},
"returns": true
},
{
"arguments": {
"data": null,
"pattern": "null"
},
"returns": null
}
]
}