|
242 | 242 | "description": "Returns one integer ~m:value~ modulo another, which is to say, the remainder after dividing the former by the latter.",
|
243 | 243 | "examples": "put Count modulo 10 into Count"
|
244 | 244 | },
|
245 |
| - "the index of": { |
246 |
| - "syntax": "the index of", |
247 |
| - "description": "The (numeric) value of the current index of a named array variable. This is the value set by ~l:index!index {variable} to ...~.", |
248 |
| - "examples": "put the index of Button into Index" |
249 |
| - }, |
250 | 245 | "property": {
|
251 | 246 | "syntax": "property {name} of {JSON string}",
|
252 | 247 | "description": "~m:property~ is used to access an item in a JSON structure. In _**EasyCoder**_, JSON objects are ~dq~stringified~dq~ and kept in plain text variables. When you request a ~m:property~ from such an object it is first parsed then the requested property is extracted for you. See also ~l:element~ and ~l:set|k!set property~.",
|
|
278 | 273 | "examples": "put tan X radius R into Length"
|
279 | 274 | },
|
280 | 275 | "left": {
|
281 |
| - "syntax": "left {count} of {Text}", |
282 |
| - "description": "returns the leftmost ~m:{count}~ characters of ~m:{Text}~.%0a", |
| 276 | + "syntax": "left {count} of {text}", |
| 277 | + "description": "returns the leftmost ~m:{count}~ characters of ~m:{text}~.%0a", |
283 | 278 | "examples": "put left 5 of Text into Prefix"
|
284 | 279 | },
|
285 | 280 | "right": {
|
|
293 | 288 | "examples": "put from 8 of Sentence into Phrase%0aput from X to Y of `the quick brown fox` into Extract"
|
294 | 289 | },
|
295 | 290 | "position": {
|
296 |
| - "syntax": "the position of [the last] {needle} in {haystack}", |
297 |
| - "description": "returns the position in ~m:{haystack}~ of either the first or the last occurrence of ~m:{needle}~, where both ~m:{needle}~ and ~m:{haystack}~ are text values.%0a%0aIf ~m:{needle}~ is not contained in ~m:{haystack}~ the value ~m:-1~ is returned.%0a", |
298 |
| - "examples": "put the position of `fox` in `The quick brown fox jumps over the lazy dog` into Pos (Pos=16)%0aput the position of the last `dot` in `dot dot dot` into P (P=8)" |
| 291 | + "syntax": "the position [nocase] of [the last] {needle} in {haystack}", |
| 292 | + "description": "returns the position in ~m:{haystack}~ of either the first or the last occurrence of ~m:{needle}~, where both ~m:{needle}~ and ~m:{haystack}~ are text values.%0a%0aIf ~m:{needle}~ is not contained in ~m:{haystack}~ the value ~m:-1~ is returned.%0a%0aIf the optional ~m:nocase~ is given the match is done with case ignored.%0a", |
| 293 | + "examples": "put the position of `fox` in `The quick brown fox jumps over the lazy dog` into Pos (Pos=16)%0aput the position nocase of the last `dot` in `Dot dot Dot` into P (P=8)" |
299 | 294 | },
|
300 | 295 | "decode": {
|
301 | 296 | "syntax": "decode {variable}",
|
|
345 | 340 | "syntax": "date {value}",
|
346 | 341 | "description": "Returns the timestamp of a given date - the number of seconds since the epoch (January 1, 1970).%0a%0aThe value returned will depend on the format given. The first example above returns 1561420800000, which is the UTC value for the date given, but the second and third return values for the local timezone. The last one returns GMT (which is the same as UTC).%0a%0aSee also ~l:today~, ~l:now~ and ~l:format~.",
|
347 | 342 | "examples": "put date `2019-06-25` into TheDate%0aput date `2019-06-25 00:00:00` into TheDate%0aput date `Tuesday June 25 2019` into TheDate%0aput date `Tuesday June 25 2019 GMT` into TheDate"
|
| 343 | + }, |
| 344 | + "char[acter]": { |
| 345 | + "syntax": "char[acter] {index} of {value}", |
| 346 | + "description": "Extracts a single character from a string. Both ~m:index~ and ~m:value~ can be either symbols or values.", |
| 347 | + "examples": "put char N of Text into C%0aprint character 5 of ~dq~helpful~dq~ --> ~dq~u~dq~" |
| 348 | + }, |
| 349 | + "split": { |
| 350 | + "syntax": "split {value} on {value} giving/into {variable}", |
| 351 | + "description": "Splits a value into an array of parts on the given separator. If no separator is given the separator is set to a newline.%0a%0aThe result is an array variable.", |
| 352 | + "examples": "split Text into Lines%0asplit CSV on `,` giving Items%0asplit `1,2,3,4,5` on Comma into Numbers" |
| 353 | + }, |
| 354 | + "index of": { |
| 355 | + "syntax": "the index of", |
| 356 | + "description": "The (numeric) value of the current index of a named array variable. This is the value set by ~l:index!index {variable} to ...~.", |
| 357 | + "examples": "put the index of Button into Index" |
| 358 | + }, |
| 359 | + "length of": { |
| 360 | + "syntax": "length of {value}", |
| 361 | + "description": "Measures a text variable.", |
| 362 | + "examples": "put the length of Name into Length" |
348 | 363 | }
|
349 | 364 | },
|
350 | 365 | "conditions": {
|
|
354 | 369 | "examples": "if EditorModule is not running goto StartEditor"
|
355 | 370 | },
|
356 | 371 | "numeric": {
|
357 |
| - "syntax": "numeric", |
| 372 | + "syntax": "[not] numeric", |
358 | 373 | "description": "Tests if a value is numeric",
|
359 |
| - "examples": "if TheValue is numeric ..." |
| 374 | + "examples": "if TheValue is numeric ...%0aif char N of Value is not numeric ..." |
360 | 375 | },
|
361 | 376 | "even": {
|
362 | 377 | "syntax": "even",
|
|
0 commit comments