string[] stringArrayRemovePrefix(string $objects[], string $prefix )
なし
| 変数名 | 変数タイプ | 説明 |
|---|---|---|
| $objects | string[] | 入力文字配列。 |
| $prefix | string | $objects の各項目の先頭から除去される文字列。 |
stringArrayRemovePrefix( {}, "+++" );
// ,Result:, //
stringArrayRemovePrefix( { "a", "b", "c" }, "" );
// ,Result:, a b c //
stringArrayRemovePrefix( { "a", "b", "c" }, "***" );
// ,Result:, a b c //
stringArrayRemovePrefix( { "***a", "***b", "***c" }, "***" );
// ,Result:, a b c //
stringArrayRemovePrefix( { "***a", "+++b", "---c" }, "***" );
// ,Result:, a +++b ---c //
stringArrayRemovePrefix( { "***a", "", "---c" }, "***" );
// ,Result:, a ---c //