1<html lang="en"> 2<head> 3<title>isalnum - Untitled</title> 4<meta http-equiv="Content-Type" content="text/html"> 5<meta name="description" content="Untitled"> 6<meta name="generator" content="makeinfo 4.13"> 7<link title="Top" rel="start" href="index.html#Top"> 8<link rel="up" href="Ctype.html#Ctype" title="Ctype"> 9<link rel="next" href="isalpha.html#isalpha" title="isalpha"> 10<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 11<meta http-equiv="Content-Style-Type" content="text/css"> 12<style type="text/css"><!-- 13 pre.display { font-family:inherit } 14 pre.format { font-family:inherit } 15 pre.smalldisplay { font-family:inherit; font-size:smaller } 16 pre.smallformat { font-family:inherit; font-size:smaller } 17 pre.smallexample { font-size:smaller } 18 pre.smalllisp { font-size:smaller } 19 span.sc { font-variant:small-caps } 20 span.roman { font-family:serif; font-weight:normal; } 21 span.sansserif { font-family:sans-serif; font-weight:normal; } 22--></style> 23<link rel="stylesheet" type="text/css" href="../cs.css"> 24</head> 25<body> 26<div class="node"> 27<a name="isalnum"></a> 28<p> 29Next: <a rel="next" accesskey="n" href="isalpha.html#isalpha">isalpha</a>, 30Up: <a rel="up" accesskey="u" href="Ctype.html#Ctype">Ctype</a> 31<hr> 32</div> 33 34<h3 class="section">3.1 <code>isalnum</code>—alphanumeric character predicate</h3> 35 36<p><a name="index-isalnum-110"></a><strong>Synopsis</strong> 37<pre class="example"> #include <ctype.h> 38 int isalnum(int <var>c</var>); 39 40</pre> 41 <p><strong>Description</strong><br> 42<code>isalnum</code> is a macro which classifies ASCII integer values by table 43lookup. It is a predicate returning non-zero for alphabetic or 44numeric ASCII characters, and <code>0</code> for other arguments. It is defined 45only if <var>c</var> is representable as an unsigned char or if <var>c</var> is EOF. 46 47 <p>You can use a compiled subroutine instead of the macro definition by 48undefining the macro using `<code>#undef isalnum</code>'. 49 50 <p><br> 51<strong>Returns</strong><br> 52<code>isalnum</code> returns non-zero if <var>c</var> is a letter (<code>a</code>–<code>z</code> or 53<code>A</code>–<code>Z</code>) or a digit (<code>0</code>–<code>9</code>). 54 55 <p><br> 56<strong>Portability</strong><br> 57<code>isalnum</code> is ANSI C. 58 59 <p>No OS subroutines are required. 60 61 <p><br> 62 63 </body></html> 64 65