移動先: 概要 戻り値 関連項目. MEL 例.

概要

size array|string

size は 「元に戻す」が不可能「照会」が不可能「編集」が不可能 です。

このコマンドは、配列の要素数または文字列の文字数を返します。

マルチバイト キャラクタを含む文字列では、size は文字列内の文字数を返します。これはバイト数とは異なります。

戻り値

int

関連項目

clear, sizeBytes

MEL 例

int $myInts[]={1,2,3,4,5,6};
$numInts=size($myInts);
// Result: 6 //

string $myString = "a string";
$strSize=size($myString);
// Result: 8 //

// Also, please see the examples for the <b>clear</b> command.