Translation update done using Pootle.
[phpmyadmin/madhuracj.git] / libraries / string_type_ctype.lib.php
blob271b0f79da8ca064d96ee4865e84fa6630fbb33f
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 * @package phpMyAdmin-StringType-CType
18 /**
19 * Checks if a character is an alphanumeric one
21 * @param string character to check for
22 * @return boolean whether the character is an alphanumeric one or not
24 function PMA_STR_isAlnum($c)
26 return ctype_alnum($c);
27 } // end of the "PMA_STR_isAlnum()" function
29 /**
30 * Checks if a character is an alphabetic one
32 * @param string character to check for
33 * @return boolean whether the character is an alphabetic one or not
35 function PMA_STR_isAlpha($c)
37 return ctype_alpha($c);
38 } // end of the "PMA_STR_isAlpha()" function
40 /**
41 * Checks if a character is a digit
43 * @param string character to check for
44 * @return boolean whether the character is a digit or not
46 function PMA_STR_isDigit($c)
48 return ctype_digit($c);
49 } // end of the "PMA_STR_isDigit()" function
51 /**
52 * Checks if a character is an upper alphabetic one
54 * @param string character to check for
55 * @return boolean whether the character is an upper alphabetic one or not
57 function PMA_STR_isUpper($c)
59 return ctype_upper($c);
60 } // end of the "PMA_STR_isUpper()" function
63 /**
64 * Checks if a character is a lower alphabetic one
66 * @param string character to check for
67 * @return boolean whether the character is a lower alphabetic one or not
69 function PMA_STR_isLower($c)
71 return ctype_lower($c);
72 } // end of the "PMA_STR_isLower()" function
74 /**
75 * Checks if a character is a space one
77 * @param string character to check for
78 * @return boolean whether the character is a space one or not
80 function PMA_STR_isSpace($c)
82 return ctype_space($c);
83 } // end of the "PMA_STR_isSpace()" function
85 /**
86 * Checks if a character is an hexadecimal digit
88 * @param string character to check for
89 * @return boolean whether the character is an hexadecimal digit or not
91 function PMA_STR_isHexDigit($c)
93 return ctype_xdigit($c);
94 } // end of the "PMA_STR_isHexDigit()" function