diff --git a/functions/ctype.xml b/functions/ctype.xml index 152cd0af94..1ecf7d1ca6 100644 --- a/functions/ctype.xml +++ b/functions/ctype.xml @@ -1,22 +1,19 @@ - + Character type functions ctype - - These functions check whether a character or string - falls into a certain character class according to the - current locale. - - - To get these functions to work, you must have compiled PHP - with . + + + The functions provided by this extension check whether a character + or string falls into a certain character class according to the + current locale (see also setlocale). When called with an integer argument these functions - behave exactly like their C counterparts. + behave exactly like their C counterparts from "ctype.h". When called with a string argument they will check @@ -28,6 +25,45 @@ Passing anything else but a string or integer will return &false; immediately. + +
+ Requirements + + None besides functions from the standard C library which are + always available. + +
+ +
+ Installation + + Beginning with PHP 4.2.0 this function are enabled by default. + For older versions you have to configure and compile PHP + with . + +
+ +
+ Runtime Configuration + + This extension does not define any configuration directives. + +
+ +
+ Resource types + + This extension does not define any resource types. + +
+ +
+ Predefined constants + + This extension does not define any constants. + +
+
@@ -38,16 +74,23 @@ Description - - boolctype_alnum - stringc - + + boolctype_alnum + stringtext + - See also setlocale. + Returns &true; if every character in text is either + a letter or a digit, &false; otherwise. In the standard C + locale letters are just [A-Za-z]. The function is equivalent + to (ctype_alpha($text) || ctype_digit($text)). + + + See also ctype_alpha, ctype_digit, + and setlocale. - + ctype_alpha @@ -55,15 +98,27 @@ Description - - boolctype_alpha - stringc - + + boolctype_alpha + stringtext + + Returns &true; if every character in text is + a letter from the current locale, &false; otherwise. + In the standard C locale letters are just + [A-Za-z] and ctype_alpha is + equivalent to (ctype_upper($text) || ctype_lower($text)), + but other languages have letters that are considered neither upper nor + lower case. + + + See also ctype_upper, + ctype_lower, and + setlocale. - + ctype_cntrl @@ -71,15 +126,18 @@ Description - - boolctype_cntrl - stringc - + + boolctype_cntrl + stringtext + + Returns &true; if every character in text has + a special control funcion, &false; otherwise. Control characters are + e.g. line feed, tab, esc. - + ctype_digit @@ -87,15 +145,20 @@ Description - - boolctype_digit - stringc - + + boolctype_digit + stringtext + + Returns &true; if every character in text is + a decimal digit, &false; otherwise. + + + See also ctype_alnum and ctype_xdigit. - + ctype_lower @@ -103,15 +166,20 @@ Description - - boolctype_lower - stringc - + + boolctype_lower + stringtext + + Returns &true; if every character in text is + a lowercase letter in the current locale. + + + See also ctype_alpha and ctype_upper. - + ctype_graph @@ -119,15 +187,22 @@ Description - - boolctype_graph - stringc - + + boolctype_graph + stringtext + + Returns &true; if every character in text is + printable and actualy creates visible output (no white space), &false; + otherwise. + + + See also ctype_alnum, ctype_print, + and ctype_punct. - + ctype_print @@ -135,15 +210,23 @@ Description - - boolctype_print - stringc - + + boolctype_print + stringtext + + Returns &true; if every character in text + will actualy create output (including blanks). Returns &false; if + text contains control characters or characters + that do not have any output or control function at all. + + + See also ctype_cntrl, ctype_graph, + and ctype_punct. - + ctype_punct @@ -154,15 +237,21 @@ Description - - boolctype_punct - stringc - + + boolctype_punct + stringtext + + Returns &true; if every character in text + is printable, but neither letter, digit or blank, &false; otherwise. + + + See also ctype_cntrl, ctype_graph, + and ctype_punct. - + ctype_space @@ -170,15 +259,19 @@ Description - - boolctype_space - stringc - + + boolctype_space + stringtext + + Returns &true; if every character in text + creates some sort of white space, &false; otherwise. Besides the + blank character this also includes tab, vertical tab, line feed, + carriage return and formfeed characters. - + ctype_upper @@ -186,11 +279,16 @@ Description - - boolctype_upper - stringc - + + boolctype_upper + stringtext + + Returns &true; if every character in text is + a uppercase letter in the current locale. + + + See also ctype_alpha and ctype_lower. @@ -204,15 +302,21 @@ Description - - boolctype_xdigit - stringc + + boolctype_xdigit + stringtext + Returns &true; if every character in text is + a hexadecimal 'digit', that is a decimal digit or a character from + [A-Fa-f] , &false; otherwise. + + + See also ctype_digit. - +