Array (array)
An array of elements. See arrays.
Returned by
Array objects are returned by the following functions and methods:
- (追記)
files()(追記ここまで) - (追記)
get_option()(追記ここまで) - (追記)
array.flatten()(追記ここまで) - (追記)
array.slice()(追記ここまで) - (追記)
cfg_data.keys()(追記ここまで) - (追記)
compiler.cmd_array()(追記ここまで) - (追記)
compiler.first_supported_argument()(追記ここまで) - (追記)
compiler.first_supported_link_argument()(追記ここまで) - (追記)
compiler.get_supported_arguments()(追記ここまで) - (追記)
compiler.get_supported_function_attributes()(追記ここまで) - (追記)
compiler.get_supported_link_arguments()(追記ここまで) - (追記)
compiler.preprocess()(追記ここまで) - (追記)
custom_tgt.to_list()(追記ここまで) - (追記)
dict.keys()(追記ここまで) - (追記)
dict.values()(追記ここまで) - (追記)
inc.to_list()(追記ここまで) - (追記)
meson.project_license()(追記ここまで) - (追記)
meson.project_license_files()(追記ここまで) - (追記)
program.cmd_array()(追記ここまで) - (追記)
str.split()(追記ここまで) - (追記)
str.splitlines()(追記ここまで)
Array methods
array.contains()
Returns true if the array contains the object
given as argument, false otherwise
Signature
# Returns `true` if the array contains the object
(追記) bool (追記ここまで) contains(
(追記) any (追記ここまで) item, # The item to check
)
Arguments
Argument flattening is NOT SUPPORTED by this function.
The method array.contains() accepts the following positional arguments:
| Name | Type | Description | Tags |
|---|---|---|---|
item |
(追記) any (追記ここまで) |
The item to check |
array.flatten()
Returns a flattened copy of the array, with all nested arrays removed.
Signature
(since 1.9.0)
(追記) array (追記ここまで)[(追記) any (追記ここまで)] flatten()
array.get()
returns the object at the given index,
negative indices count from the back of the array, indexing out of
bounds returns the fallback value (since 0.38.0) or, if it is
not specified, causes a fatal error
Signature
# returns the object at the given index,
(追記) any (追記ここまで) get(
(追記) int (追記ここまで) index, # Index of the array position to query
(追記) any (追記ここまで) [fallback], # Fallback value that is returned if the index is out of range
)
Arguments
Argument flattening is NOT SUPPORTED by this function.
The method array.get() accepts the following positional arguments:
| Name | Type | Description | Tags |
|---|---|---|---|
index |
(追記) int (追記ここまで) |
Index of the array position to query. Negative values start at the end of the array |
|
fallback |
(追記) any (追記ここまで) |
Fallback value that is returned if the index is out of range. |
[optional] |
array.length()
Returns the current size of the array.
Signature
(追記) int (追記ここまで) length()
array.slice()
Return a selection of the elements of the array starting at index start
and continuing with step size jumps until stop. Negative indices count
from the back of the array. The step size cannot be zero, but may be
negative. If it is negative, start and stop default to the end and
beginning of the array, respectively. If step is positive, start
defaults to 0 and stop defaults to the length of the array. Either both
or none of start and stop must be provided to prevent ambiguity.
Signature
(since 1.10.0)
# Return a selection of the elements of the array starting at index `start`
(追記) array (追記ここまで)[(追記) any (追記ここまで)] slice(
(追記) int (追記ここまで) [start], # The lower bound of the slice
(追記) int (追記ここまで) [stop], # The upper bound of the slice
# Keyword arguments:
step : (追記) int (追記ここまで) # The step size
)
Arguments
The method array.slice() accepts the following positional arguments:
| Name | Type | Description | Tags |
|---|---|---|---|
start |
(追記) int (追記ここまで) |
The lower bound of the slice |
[optional] |
stop |
(追記) int (追記ここまで) |
The upper bound of the slice |
[optional] |
Finally, array.slice()
accepts the following keyword arguments:
| Name | Type | Description | Tags |
|---|---|---|---|
step |
(追記) int (追記ここまで) |
The step size |
|
The results of the search are