1 개요
- PHP str_starts_with()
PHP
CPU
0.0s
MEM
20M
0.2s
Copy
<?php
if (str_starts_with('abc', '')) {
echo "All strings start with the empty string";
}
All strings start with the empty string
PHP
Copy
<?php
$string = 'The lazy fox jumped over the fence';
if (str_starts_with($string, 'The')) {
echo "The string starts with 'The'\n";
}
if (str_starts_with($string, 'the')) {
echo 'The string starts with "the"';
} else {
echo '"the" was not found because the case does not match';
}
Loading
2 같이 보기
- PHP str_contains() - Determine if a string contains a given substring
- PHP str_ends_with() - Checks if a string ends with a given substring
- PHP stripos() - Find the position of the first occurrence of a case-insensitive substring in a string
- PHP strrpos() - Find the position of the last occurrence of a substring in a string
- PHP strripos() - Find the position of the last occurrence of a case-insensitive substring in a string
- PHP strstr() - Find the first occurrence of a string
- PHP strpbrk() - Search a string for any of a set of characters
- PHP substr() - Return part of a string
- PHP preg_match() - Perform a regular expression match
- 함수 str_starts_with()
3 참고
편집자 Jmnote
로그인하시면 댓글을 쓸 수 있습니다.
- 분류 댓글:
- PHP (8)
PHP 파일 다운로드 구현 2 (한글 파일명 지원) ― …PHP에서 오라클 DB 사용 ― YoWuPHP 파일 업로드 구현 ― 일리단사오육칠PHP 파일 업로드 구현 ― JmnotePHP 파일 다운로드 구현 2 (한글 파일명 지원) ― AnmkstLib my.php ― 신정섭Lib my.php ― Jmnote로또번호 생성 ―Pinkcrimson