Booleanを1/0にして返す。
trueなら1,falseなら0
static
Integer
boolToInt
(Boolean $value)
Booleanが期待される値をBooleanに変換
static
unknown_type
boolValue
(unknown_type $value)
デフォルトの書式で書式化
static
string
defaultFormat
(unknown_type $value)
2値の距離
たとえば 0から2の距離は 2
static
unknown_type
distance
($origin $origin, $position $position)
-
$origin
$origin: 基準位置
-
$position
$position: 位置
デフォルトの書式で書式化
static
string
format
(object $value)
boolの真偽に対し文字列を割り当てて返す
static
string
formatBool
(Boolean $value, unknown_type $trueExpression, unknown_type $falseExpression)
-
Boolean
$value: 入力値
-
unknown_type
$trueExpression: 値がtrueの場合の出力
-
unknown_type
$falseExpression: 値がfalseの場合の出力
boolの真偽に対し文字列(YesかNo)を割り当てて返す
static
string
formatBoolYesNo
(Boolean $value)
boolの真偽に対し文字列(YかN)を割り当てて返す
static
string
formatBoolYN
(Boolean $value)
通貨形式書式化
static
string
formatCurrency
(decimal $value)
桁区切り書式化
static
string
formatNumber
(decimal $value)
0埋め書式化
static
string
formatZero
(Number $value, Number $width)
-
Number
$value: 入力値
-
Number
$width: 出力文字数
指定数値が範囲内にあるかチェック
static
Boolean
isInRange
(Number $target, Number $min, Number $max)
-
Number
$target: 入力値
-
Number
$min: 最小値
-
Number
$max: 最大値
文字列を解析してBooleanを返す
static
Boolean
parseBool
(string $s)
decimalのべき乗。
有理数乗はわからないので保留。
static
Number
power
(decimal $x, int $y)
-
decimal
$x: 基数
-
int
$y: べき数
指定精度で四捨五入
static
$result
round
(double $value, int $scale)
-
double
$value: 入力値
-
int
$scale: 精度
指定精度で切り捨て
static
$result
roundDown
(double $value, int $scale)
-
double
$value: 入力値
-
int
$scale: 精度
指定精度で切り上げ
static
$result
roundUp
(double $value, int $scale)
-
double
$value: 入力値
-
int
$scale: 精度
byte型が期待される値を0~255内のint型に変換する
static
integer
toByte
(object $o)
static
void
toFloat
( $o)
整数値に変換
static
number|number
toInteger
(unknown_type $o)
数値型に変換(精度指定付き)
static
数値型
toNumber
(object $o, [integer $precision = 20], [integer $scale = 0])
-
object
$o
-
integer
$precision
-
integer
$scale