Debian Codegraph @

subprojects/meson-docs/docs/yaml/elementary/list.yml

raw
1 name: list
2 long_name: List
3 description: An array of elements. See [arrays](Syntax.md#arrays).
4 is_container: true
5
6 methods:
7 - name: contains
8 returns: bool
9 description: |
10 Returns `true` if the array contains the object
11 given as argument, `false` otherwise
12
13 arg_flattening: false
14
15 posargs:
16 item:
17 type: any
18 description: The item to check
19
20 - name: get
21 returns: any
22 description: |
23 returns the object at the given index,
24 negative indices count from the back of the array, indexing out of
25 bounds returns the `fallback` value *(since 0.38.0)* or, if it is
26 not specified, causes a fatal error
27
28 arg_flattening: false
29
30 posargs:
31 index:
32 type: int
33 description: Index of the list position to query. Negative values start at the end of the list
34
35 optargs:
36 fallback:
37 type: any
38 description: Fallback value that is returned if the index is out of range.
39
40 - name: length
41 returns: int
42 description: Returns the current size of the array / list.