|
|
(Next) File::stripTrailingSeparators() |
||||
| |
|||||
|
|||||
string File::stripLeadingSeparators (
string $path
,
string $separator =
= DIRECTORY_SEPARATOR
)
このメソッドは、パス名から先頭のセパレータ (*nixでは "/" のような) を取り除きます。
string $path - 先頭のセパレータを取り除くパス名を指定します。
string $separator - セパレータを定義するオプション文字列を指定します。 このパラメータのデフォルト値は、PHP であらかじめ定義されている DIRECTORY_SEPARATOR 定数の値です。
このメソッドは、 先頭のディレクトリセパレータが取り除かれたパス名を返します。
This function can be called statically.
File::stripLeadingSeparators() の使用
<?php
require_once "File.php";
echo File::stripLeadingSeparators("/home/foo/lala/");
?>
この例は、home/foo/lala/ を表示します。
|
|
(Next) File::stripTrailingSeparators() |
||||||||
| |
|||||||||
|
|||||||||