Results of 1 - 2 of about 2 for bcdef (0.001 sec.)
- 文字列の一部分を返す 11228
- « strtr substr_compare » PHP Manual String 関数 文字列の一部分を返す 検索 substr (PHP 4, PHP 5, PHP 7, PHP 8) substr — 文字列の一部分を返す 説明 function substr ( string $string , int $offset , ? int $length = null ): string 文字列 string の
... offset が 0 以上の場合、返される文字列は、 string の 0 から数えて offset 番目から始まる文字列となります。 例えば、文字列' abcdef 'において位置 0 にある文字は、' a 'であり、 位置 2 には' c 'があります。 offset が負の場合、返される文字列は、 string の後 ... なります。 string の長さが offset 文字より短い場合は、 空の文字列が返されます。 例1 負の offset の使用 <?php echo substr ( "abcdef" , - 1 ), PHP_EOL ; // "f" を返す echo substr ( "abcdef" , - 2 ), PHP_EOL ; // "ef" を返す echo substr ( "abcdef" , - 3 , ... たは null の場合は、 offset の位置から文字列の最後までの部分文字列を返します。 例2 負の length の使用 <?php echo substr ( "abcdef" , 0 , - 1 ), PHP_EOL ; // "abcde" を返す echo substr ( "abcdef" , 2 , - 1 ), PHP_EOL ; // "cde" を返す echo substr ( "abc ...
-
https://man.mtool.work/php/8.3/function.substr.html
- 文字列の一部分を返す 7485
- « strtr substr_compare » PHP Manual String 関数 文字列の一部分を返す 検索 substr (PHP 4, PHP 5, PHP 7, PHP 8) substr — 文字列の一部分を返す 説明 function substr ( string $string , int $offset , ? int $length = null ): string 文字列 string の
... offset が 0 以上の場合、返される文字列は、 string の 0 から数えて offset 番目から始まる文字列となります。 例えば、文字列' abcdef 'において位置 0 にある文字は、' a 'であり、 位置 2 には' c 'があります。 offset が負の場合、返される文字列は、 string の後 ... なります。 string の長さが offset 文字より短い場合は、 空の文字列が返されます。 例1 負の offset の使用 <?php echo substr ( "abcdef" , - 1 ), PHP_EOL ; // "f" を返す echo substr ( "abcdef" , - 2 ), PHP_EOL ; // "ef" を返す echo substr ( "abcdef" , - 3 , ... たは null の場合は、 offset の位置から文字列の最後までの部分文字列を返します。 例2 負の length の使用 <?php echo substr ( "abcdef" , 0 , - 1 ), PHP_EOL ; // "abcde" を返す echo substr ( "abcdef" , 2 , - 1 ), PHP_EOL ; // "cde" を返す echo substr ( "abc ...
-
https://man.mtool.work/php/8.3/function.substr.html
PREV
1
NEXT