Create a function to check whether a string begins with the specified string or not. The function should return TRUE on success or FALSE on failure.
The following is the syntax −
1 |
|
Consider the following parameters in it to check −
str − The string to be tested
begnStr − The text to be searched in the beginning of the specified string.
Example
The following is an example −
Live Demo
1 2 3 4 5 6 7 8 9 10 |
|
输出
以下是输出 −
1 |
|
以上就是在PHP中检查一个字符串是否以给定的单词开头的详细内容,更多请关注php中文网其它相关文章!
发表评论:
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。