Upgraded phpmyadmin to 4.0.4 (All Languages) - No modifications yet
[openemr.git] / phpmyadmin / libraries / string_type_ctype.lib.php
blob12469baf3a3022b03d5db617393088e74be0b5b8
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Specialized String Functions for phpMyAdmin
6 * Defines a set of function callbacks that have a pure C version available if
7 * the "ctype" extension is available, but otherwise have PHP versions to use
8 * (that are slower).
10 * The SQL Parser code relies heavily on these functions.
12 * @package PhpMyAdmin-String
13 * @subpackage CType
15 if (! defined('PHPMYADMIN')) {
16 exit;
19 /**
20 * Checks if a character is an alphanumeric one
22 * @param string $c character to check for
24 * @return boolean whether the character is an alphanumeric one or not
26 function PMA_STR_isAlnum($c)
28 return ctype_alnum($c);
29 } // end of the "PMA_STR_isAlnum()" function
31 /**
32 * Checks if a character is an alphabetic one
34 * @param string $c character to check for
36 * @return boolean whether the character is an alphabetic one or not
38 function PMA_STR_isAlpha($c)
40 return ctype_alpha($c);
41 } // end of the "PMA_STR_isAlpha()" function
43 /**
44 * Checks if a character is a digit
46 * @param string $c character to check for
48 * @return boolean whether the character is a digit or not
50 function PMA_STR_isDigit($c)
52 return ctype_digit($c);
53 } // end of the "PMA_STR_isDigit()" function
55 /**
56 * Checks if a character is an upper alphabetic one
58 * @param string $c character to check for
60 * @return boolean whether the character is an upper alphabetic one or not
62 function PMA_STR_isUpper($c)
64 return ctype_upper($c);
65 } // end of the "PMA_STR_isUpper()" function
68 /**
69 * Checks if a character is a lower alphabetic one
71 * @param string $c character to check for
73 * @return boolean whether the character is a lower alphabetic one or not
75 function PMA_STR_isLower($c)
77 return ctype_lower($c);
78 } // end of the "PMA_STR_isLower()" function
80 /**
81 * Checks if a character is a space one
83 * @param string $c character to check for
85 * @return boolean whether the character is a space one or not
87 function PMA_STR_isSpace($c)
89 return ctype_space($c);
90 } // end of the "PMA_STR_isSpace()" function
92 /**
93 * Checks if a character is an hexadecimal digit
95 * @param string $c character to check for
97 * @return boolean whether the character is an hexadecimal digit or not
99 function PMA_STR_isHexDigit($c)
101 return ctype_xdigit($c);
102 } // end of the "PMA_STR_isHexDigit()" function