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

概要

string startString(string $s, int $count)

このプロシージャは、文字列 $s の最初の $count 文字を返します。 $count が 0 か負の場合は、空の文字列が返されます。 $count が $s の文字数と同じかそれ以上の長さの場合は、文字列全体が返されます。

戻り値

なし

関連項目

endString, endsWith, startsWith

MEL 例

		startString("abc", 1);
		// Result: a //

		startString("abc", 8);
		// Result: abc //

		startString("abc", 0);
		startString("", 3);