forked from phpmyadmin/phpmyadmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstring_type_ctype.lib.php
103 lines (94 loc) · 2.58 KB
/
string_type_ctype.lib.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Specialized String Functions for phpMyAdmin
*
* Copyright 2002 Robin Johnson <robbat2@users.sourceforge.net>
* http://www.orbis-terrarum.net/?l=people.robbat2
*
* Defines a set of function callbacks that have a pure C version available if
* the "ctype" extension is available, but otherwise have PHP versions to use
* (that are slower).
*
* The SQL Parser code relies heavily on these functions.
*
* @package phpMyAdmin-StringType-CType
*/
/**
* Checks if a character is an alphanumeric one
*
* @uses ctype_alnum()
* @param string character to check for
* @return boolean whether the character is an alphanumeric one or not
*/
function PMA_STR_isAlnum($c)
{
return ctype_alnum($c);
} // end of the "PMA_STR_isAlnum()" function
/**
* Checks if a character is an alphabetic one
*
* @uses ctype_alpha()
* @param string character to check for
* @return boolean whether the character is an alphabetic one or not
*/
function PMA_STR_isAlpha($c)
{
return ctype_alpha($c);
} // end of the "PMA_STR_isAlpha()" function
/**
* Checks if a character is a digit
*
* @uses ctype_digit()
* @param string character to check for
* @return boolean whether the character is a digit or not
*/
function PMA_STR_isDigit($c)
{
return ctype_digit($c);
} // end of the "PMA_STR_isDigit()" function
/**
* Checks if a character is an upper alphabetic one
*
* @uses ctype_upper()
* @param string character to check for
* @return boolean whether the character is an upper alphabetic one or not
*/
function PMA_STR_isUpper($c)
{
return ctype_upper($c);
} // end of the "PMA_STR_isUpper()" function
/**
* Checks if a character is a lower alphabetic one
*
* @uses ctype_lower()
* @param string character to check for
* @return boolean whether the character is a lower alphabetic one or not
*/
function PMA_STR_isLower($c)
{
return ctype_lower($c);
} // end of the "PMA_STR_isLower()" function
/**
* Checks if a character is a space one
*
* @uses ctype_space()
* @param string character to check for
* @return boolean whether the character is a space one or not
*/
function PMA_STR_isSpace($c)
{
return ctype_space($c);
} // end of the "PMA_STR_isSpace()" function
/**
* Checks if a character is an hexadecimal digit
*
* @uses ctype_xdigit()
* @param string character to check for
* @return boolean whether the character is an hexadecimal digit or not
*/
function PMA_STR_isHexDigit($c)
{
return ctype_xdigit($c);
} // end of the "PMA_STR_isHexDigit()" function
?>