?? intro.ctype.html
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Introduction</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="book.ctype.html">Ctype</a></div> <div class="next" style="text-align: right; float: right;"><a href="ctype.setup.html">Installing/Configuring</a></div> <div class="up"><a href="book.ctype.html">Ctype</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="intro.ctype" class="preface"> <h1 class="title">Introduction</h1> <p class="para"> The functions provided by this extension check whether a character or string falls into a certain character class according to the current locale (see also <a href="function.setlocale.html" class="function">setlocale()</a>). </p> <p class="para"> When called with an integer argument these functions behave exactly like their C counterparts from <var class="filename">ctype.h</var>. It means that if you pass an integer smaller than 256 it will use the ASCII value of it to see if it fits in the specified range (digits are in 0x30-0x39). If the number is between -128 and -1 inclusive then 256 will be added and the check will be done on that. </p> <p class="para"> When called with a string argument they will check every character in the string and will only return <b><tt>TRUE</tt></b> if every character in the string matches the requested criteria. When called with an empty string the result will always be <b><tt>TRUE</tt></b> in PHP < 5.1 and <b><tt>FALSE</tt></b> since 5.1. </p> <p class="para"> Passing anything else but a string or integer will return <b><tt>FALSE</tt></b> immediately. </p> <p class="para"> It should be noted that ctype functions are always preferred over regular expressions, and even to some equivalent str_* and is_* functions. This is because of the fact that ctype uses a native C library and thus processes significantly faster. </p> </div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="book.ctype.html">Ctype</a></div> <div class="next" style="text-align: right; float: right;"><a href="ctype.setup.html">Installing/Configuring</a></div> <div class="up"><a href="book.ctype.html">Ctype</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -