Translated using Weblate (Slovak)
[phpmyadmin.git] / libraries / StringCType.class.php
blobd7256fa7b81f31dcecaac0c7a6e45afb2d26836f
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Implements PMA_StringType interface using the "ctype" extension.
5 * Methods of the "ctype" extension are faster compared to PHP versions of them.
7 * @package PhpMyAdmin-String
8 * @subpackage CType
9 */
10 if (! defined('PHPMYADMIN')) {
11 exit;
14 require_once 'libraries/StringAbstractType.class.php';
16 /**
17 * Implements PMA_StringType interface using the "ctype" extension.
18 * Methods of the "ctype" extension are faster compared to PHP versions of them.
20 * @package PhpMyAdmin-String
21 * @subpackage CType
23 class PMA_StringCType extends PMA_StringAbstractType
25 /**
26 * Checks if a character is an alphanumeric one
28 * @param string $c character to check for
30 * @return boolean whether the character is an alphanumeric one or not
32 public function isAlnum($c)
34 return ctype_alnum($c);
35 } // end of the "isAlnum()" function
37 /**
38 * Checks if a character is an alphabetic one
40 * @param string $c character to check for
42 * @return boolean whether the character is an alphabetic one or not
44 public function isAlpha($c)
46 return ctype_alpha($c);
47 } // end of the "isAlpha()" function
49 /**
50 * Checks if a character is a digit
52 * @param string $c character to check for
54 * @return boolean whether the character is a digit or not
56 public function isDigit($c)
58 return ctype_digit($c);
59 } // end of the "isDigit()" function
61 /**
62 * Checks if a character is an upper alphabetic one
64 * @param string $c character to check for
66 * @return boolean whether the character is an upper alphabetic one or not
68 public function isUpper($c)
70 return ctype_upper($c);
71 } // end of the "isUpper()" function
74 /**
75 * Checks if a character is a lower alphabetic one
77 * @param string $c character to check for
79 * @return boolean whether the character is a lower alphabetic one or not
81 public function isLower($c)
83 return ctype_lower($c);
84 } // end of the "PisLower()" function
86 /**
87 * Checks if a character is a space one
89 * @param string $c character to check for
91 * @return boolean whether the character is a space one or not
93 public function isSpace($c)
95 return ctype_space($c);
96 } // end of the "isSpace()" function
98 /**
99 * Checks if a character is an hexadecimal digit
101 * @param string $c character to check for
103 * @return boolean whether the character is an hexadecimal digit or not
105 public function isHexDigit($c)
107 return ctype_xdigit($c);
108 } // end of the "isHexDigit()" function