mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-29 23:38:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@40879 c90b9560-bf6c-de11-be94-00142212c4b1
258 lines
6.8 KiB
XML
258 lines
6.8 KiB
XML
<reference id="ref.ctype">
|
|
<title>Character type functions</title>
|
|
<titleabbrev>ctype</titleabbrev>
|
|
|
|
<partintro>
|
|
<para>
|
|
These functions check whether a character or string
|
|
falls into a certain character class according to the i
|
|
current locale.
|
|
</para>
|
|
<para>
|
|
When called with an integer argument theese functions
|
|
behave exactly like their C counterparts.
|
|
</para>
|
|
<para>
|
|
When called with a string argument they will check
|
|
every character in the string and will only return
|
|
true if every character in the string matches the
|
|
requested criteria.
|
|
</para>
|
|
<para>
|
|
Passing anything else but a string or integer will
|
|
return false immediately.
|
|
</para>
|
|
<warning>
|
|
<simpara>
|
|
Theese functions are new as of PHP 4.0.4 and
|
|
might change their name in the near future.
|
|
Suggestions are to change them to
|
|
<function>ctype_issomething</function>
|
|
instead of <function>ctype_somthing</function>
|
|
or even to make them part of <filename>ext/standard</filename>
|
|
and use their original C-Names, although this would possibly
|
|
lead to further confusion regarding the <function>isset</function>
|
|
vs. <function>is_sometype</function> problem.
|
|
</simpara>
|
|
</warning>
|
|
</partintro>
|
|
|
|
|
|
<refentry id="function.ctype-alnum">
|
|
<refnamediv>
|
|
<refname>ctype_alnum</refname>
|
|
<refpurpose>Check for alphanumeric character(s)</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<funcsynopsis>
|
|
<funcprototype>
|
|
<funcdef>bool <function>ctype_alnum</function></funcdef>
|
|
<paramdef>string <parameter>c</parameter></paramdef>
|
|
</funcprototype>
|
|
</funcsynopsis>
|
|
<para>
|
|
See also <function>setlocale</function>.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id="function.ctype-alpha">
|
|
<refnamediv>
|
|
<refname>ctype_alpha</refname>
|
|
<refpurpose>Check for alphabetic character(s)</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<funcsynopsis>
|
|
<funcprototype>
|
|
<funcdef>bool <function>ctype_alpha</function></funcdef>
|
|
<paramdef>string <parameter>c</parameter></paramdef>
|
|
</funcprototype>
|
|
</funcsynopsis>
|
|
<para>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id="function.ctype-cntrl">
|
|
<refnamediv>
|
|
<refname>ctype_cntrl</refname>
|
|
<refpurpose>Check for control character(s)</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<funcsynopsis>
|
|
<funcprototype>
|
|
<funcdef>bool <function>ctype_cntrl</function></funcdef>
|
|
<paramdef>string <parameter>c</parameter></paramdef>
|
|
</funcprototype>
|
|
</funcsynopsis>
|
|
<para>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id="function.ctype-digit">
|
|
<refnamediv>
|
|
<refname>ctype_digit</refname>
|
|
<refpurpose>Check for numeric character(s)</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<funcsynopsis>
|
|
<funcprototype>
|
|
<funcdef>bool <function>ctype_digit</function></funcdef>
|
|
<paramdef>string <parameter>c</parameter></paramdef>
|
|
</funcprototype>
|
|
</funcsynopsis>
|
|
<para>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id="function.ctype-lower">
|
|
<refnamediv>
|
|
<refname>ctype_lower</refname>
|
|
<refpurpose>Check for lowercase character(s)</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<funcsynopsis>
|
|
<funcprototype>
|
|
<funcdef>bool <function>ctype_lower</function></funcdef>
|
|
<paramdef>string <parameter>c</parameter></paramdef>
|
|
</funcprototype>
|
|
</funcsynopsis>
|
|
<para>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id="function.ctype-graph">
|
|
<refnamediv>
|
|
<refname>ctype_graph</refname>
|
|
<refpurpose>Check for any printable character(s) except space</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<funcsynopsis>
|
|
<funcprototype>
|
|
<funcdef>bool <function>ctype_graph</function></funcdef>
|
|
<paramdef>string <parameter>c</parameter></paramdef>
|
|
</funcprototype>
|
|
</funcsynopsis>
|
|
<para>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id="function.ctype-print">
|
|
<refnamediv>
|
|
<refname>ctype_print</refname>
|
|
<refpurpose>Check for printable character(s)</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<funcsynopsis>
|
|
<funcprototype>
|
|
<funcdef>bool <function>ctype_print</function></funcdef>
|
|
<paramdef>string <parameter>c</parameter></paramdef>
|
|
</funcprototype>
|
|
</funcsynopsis>
|
|
<para>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id="function.ctype-punct">
|
|
<refnamediv>
|
|
<refname>ctype_punct</refname>
|
|
<refpurpose>Check for any printable character which is not whitespace or an alphanumeric character</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<funcsynopsis>
|
|
<funcprototype>
|
|
<funcdef>bool <function>ctype_punct</function></funcdef>
|
|
<paramdef>string <parameter>c</parameter></paramdef>
|
|
</funcprototype>
|
|
</funcsynopsis>
|
|
<para>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id="function.ctype-space">
|
|
<refnamediv>
|
|
<refname>ctype_space</refname>
|
|
<refpurpose>Check for whitespace character(s)</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<funcsynopsis>
|
|
<funcprototype>
|
|
<funcdef>bool <function>ctype_space</function></funcdef>
|
|
<paramdef>string <parameter>c</parameter></paramdef>
|
|
</funcprototype>
|
|
</funcsynopsis>
|
|
<para>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id="function.ctype-upper">
|
|
<refnamediv>
|
|
<refname>ctype_upper</refname>
|
|
<refpurpose>Check for uppercase character(s)</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<funcsynopsis>
|
|
<funcprototype>
|
|
<funcdef>bool <function>ctype_upper</function></funcdef>
|
|
<paramdef>string <parameter>c</parameter></paramdef>
|
|
</funcprototype>
|
|
</funcsynopsis>
|
|
<para>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id="function.ctype-xdigit">
|
|
<refnamediv>
|
|
<refname>ctype_xdigit</refname>
|
|
<refpurpose>Check for character(s) representing a hexadecimal digit</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<funcsynopsis>
|
|
<funcprototype>
|
|
<funcdef>bool <function>ctype_xdigit</function></funcdef>
|
|
<paramdef>string <parameter>c</parameter></paramdef>
|
|
</funcprototype>
|
|
</funcsynopsis>
|
|
<para>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
</reference>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
-->
|
|
|