Boolean (bool)
A boolean object which is either true or false
Returned by
Boolean objects are returned by the following functions and methods:
- (追記)
add_languages()(追記ここまで) - (追記)
get_option()(追記ここまで) - (追記)
is_disabler()(追記ここまで) - (追記)
is_variable()(追記ここまで) - (追記)
array.contains()(追記ここまで) - (追記)
build_tgt.found()(追記ここまで) - (追記)
cfg_data.get()(追記ここまで) - (追記)
cfg_data.get_unquoted()(追記ここまで) - (追記)
cfg_data.has()(追記ここまで) - (追記)
compiler.check_header()(追記ここまで) - (追記)
compiler.compiles()(追記ここまで) - (追記)
compiler.has_argument()(追記ここまで) - (追記)
compiler.has_define()(追記ここまで) - (追記)
compiler.has_function()(追記ここまで) - (追記)
compiler.has_function_attribute()(追記ここまで) - (追記)
compiler.has_header()(追記ここまで) - (追記)
compiler.has_header_symbol()(追記ここまで) - (追記)
compiler.has_link_argument()(追記ここまで) - (追記)
compiler.has_member()(追記ここまで) - (追記)
compiler.has_members()(追記ここまで) - (追記)
compiler.has_multi_arguments()(追記ここまで) - (追記)
compiler.has_multi_link_arguments()(追記ここまで) - (追記)
compiler.has_type()(追記ここまで) - (追記)
compiler.links()(追記ここまで) - (追記)
compiler.symbols_have_underscore_prefix()(追記ここまで) - (追記)
dep.found()(追記ここまで) - (追記)
dict.has_key()(追記ここまで) - (追記)
disabler.found()(追記ここまで) - (追記)
feature.allowed()(追記ここまで) - (追記)
feature.auto()(追記ここまで) - (追記)
feature.disabled()(追記ここまで) - (追記)
feature.enabled()(追記ここまで) - (追記)
int.is_even()(追記ここまで) - (追記)
int.is_odd()(追記ここまで) - (追記)
meson.can_run_host_binaries()(追記ここまで) - (追記)
meson.has_exe_wrapper()(追記ここまで) - (追記)
meson.has_external_property()(追記ここまで) - (追記)
meson.is_cross_build()(追記ここまで) - (追記)
meson.is_subproject()(追記ここまで) - (追記)
meson.is_unity()(追記ここまで) - (追記)
module.found()(追記ここまで) - (追記)
program.found()(追記ここまで) - (追記)
runresult.compiled()(追記ここまで) - (追記)
str.contains()(追記ここまで) - (追記)
str.endswith()(追記ここまで) - (追記)
str.startswith()(追記ここまで) - (追記)
str.version_compare()(追記ここまで) - (追記)
subproject.found()(追記ここまで)
Boolean methods
bool.to_int()
Returns 1 if true and 0 if false
Signature
(追記) int (追記ここまで) to_int()
bool.to_string()
Returns the string 'true' if the boolean is true or 'false' otherwise.
You can also pass it two strings as positional
arguments to specify what to return for true/false. For instance,
bool.to_string('yes', 'no') will return yes if the boolean is
true and no if it is false.
Signature
# Returns the string `'true'` if the boolean is true or `'false'` otherwise
(追記) str (追記ここまで) to_string(
(追記) str (追記ここまで) [true_str], # The string to return when the boolean is `true`
(追記) str (追記ここまで) [false_str], # The string to return when the boolean is `false`
)
Arguments
The method bool.to_string() accepts the following positional arguments:
| Name | Type | Description | Tags |
|---|---|---|---|
true_str |
(追記) str (追記ここまで) |
The string to return when the boolean is |
[optional]
|
false_str |
(追記) str (追記ここまで) |
The string to return when the boolean is |
[optional]
|
The results of the search are