typo
[phpmyadmin/arisferyanto.git] / libraries / string_type_ctype.lib.php
blob4e7a1067488236b7f6799a7d23c6da9adbe3f081
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Specialized String Functions for phpMyAdmin
6 * Copyright 2002 Robin Johnson <robbat2@users.sourceforge.net>
7 * http://www.orbis-terrarum.net/?l=people.robbat2
9 * Defines a set of function callbacks that have a pure C version available if
10 * the "ctype" extension is available, but otherwise have PHP versions to use
11 * (that are slower).
13 * The SQL Parser code relies heavily on these functions.
15 * @version $Id$
16 * @package phpMyAdmin-StringType-CType
19 /**
20 * Checks if a character is an alphanumeric one
22 * @uses ctype_alnum()
23 * @param string 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 * @uses ctype_alpha()
35 * @param string 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 * @uses ctype_digit()
47 * @param string 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 * @uses ctype_upper()
59 * @param string 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 * @uses ctype_lower()
72 * @param string 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 * @uses ctype_space()
84 * @param string 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 * @uses ctype_xdigit()
96 * @param string 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