-
Notifications
You must be signed in to change notification settings - Fork 0
API Boolean
Liu.Yandong.Hanks edited this page Aug 19, 2026
·
3 revisions
布尔转换与常量
Boolean conversion and constants
Overview
Boolean 按 AuroraScript 的真值规则转换值。它不是可变包装对象;结果始终是基础布尔值 true 或 false。
Booleanconverts values using AuroraScript truthiness. It is not a mutable wrapper object; the result is always the primitive Booleantrueorfalse.
Parameters:
-
value
可选待转换值。Optional value to convert.
Returns
布尔结果。
Boolean result.
return Boolean("text"); // trueParameters:
-
value
待转换值。Value to convert.
Returns
布尔结果。
Boolean result.
return Boolean.valueOf(0); // falseReturns
布尔真常量。
Boolean true constant.
return Boolean.true;Returns
布尔假常量。
Boolean false constant.
return Boolean.false;Parameters:
- 无。
None.
Returns
"true" 或 "false"。
"true"or"false".
return Boolean(true).toString(); // "true"AuroraScript.JIT 4.0.0 · Documentation Home · Repository · MIT License