首页 > 编程知识 正文

vlookup函数用法示例,拷贝构造函数示例

时间:2023-05-04 14:39:13 阅读:269464 作者:4085

ctype函数

PHP ctype_space()函数 (PHP ctype_space() function)

ctype_space() function is a character type (CType) function in PHP, it is used to check whether a given string contains whitespace or not.

ctype_space()函数是PHP中的字符类型(CType)函数,用于检查给定的字符串是否包含空格。

Note: Whitespace contains some of the other things like "tabs" (horizontal, vertical), "line feed", "carriage return", and "form feed".

注意:空格包含其他一些内容,例如“制表符”(水平,垂直),“换行符”,“回车”和“换页符”。

It returns true – if the string contains whitespaces, else it returns false.

它返回true –如果字符串包含空格,则返回false 。

Syntax:

句法:

ctype_space(string) : bool

Example:

例:

Input: "rn" Output: true Input: " " Output: true Input: "Hello world" Output: false

PHP code:

PHP代码:

<?php $str = " "; if(ctype_space($str)) echo ("$str contains whitespaces.n"); else echo ("$str does not contain whitespaces.n"); $str = "rn"; if(ctype_space($str)) echo ("$str contains whitespaces.n"); else echo ("$str does not contain whitespaces.n"); $str = "Hello world123"; if(ctype_space($str)) echo ("$str contains whitespaces.n"); else echo ("$str does not contain whitespaces.n"); $str = "[email protected]&a"; if(ctype_space($str)) echo ("$str contains whitespaces.n"); else echo ("$str does not contain whitespaces.n");?>

Output

输出量

contains whitespaces. contains whitespaces.Hello world123 does not contain whitespaces.[email protected]&a does not contain whitespaces.

翻译自: https://www.includehelp.com/php/ctype_space-function-with-example.aspx

ctype函数

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。