403 lines
29 KiB
HTML
403 lines
29 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<!-- Created by GNU Texinfo 7.0.3, https://www.gnu.org/software/texinfo/ -->
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<title>Characters (ECL Manual)</title>
|
|
|
|
<meta name="description" content="Characters (ECL Manual)">
|
|
<meta name="keywords" content="Characters (ECL Manual)">
|
|
<meta name="resource-type" content="document">
|
|
<meta name="distribution" content="global">
|
|
<meta name="Generator" content="makeinfo">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
|
|
<link href="index.html" rel="start" title="Top">
|
|
<link href="Indexes.html" rel="index" title="Indexes">
|
|
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
|
<link href="Standards.html" rel="up" title="Standards">
|
|
<link href="Conses.html" rel="next" title="Conses">
|
|
<link href="Numbers.html#Numbers" rel="prev" title="Numbers">
|
|
<style type="text/css">
|
|
<!--
|
|
/* colors */
|
|
|
|
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
|
|
span.r {font-family: initial; font-weight: normal; font-style: normal}
|
|
span:hover a.copiable-link {visibility: visible}
|
|
strong.def-name {font-family: monospace; font-weight: bold; font-size: larger}
|
|
ul.mark-bullet {list-style-type: disc}
|
|
@media (prefers-color-scheme: dark) {
|
|
/* dark theme */
|
|
html { color: seashell;
|
|
background: #1A1A1A; }
|
|
body { background: #1A1A1A; }
|
|
th { border-bottom: 2px solid lightgray; }
|
|
h1, h2, h3, h4, h5 { background-image: linear-gradient(to left, #202020, #3A3A3A); }
|
|
code, var, code a { color: darkorange;
|
|
background: #2A2A2A; }
|
|
a { color: seashell; }
|
|
pre { background: #2A2A2A;
|
|
color: seashell;
|
|
/* mark longer code block with stripe on the left */
|
|
border-left: 5px solid darkorange;
|
|
padding-left: 10px; }
|
|
pre.screen { background: #2A2A2A;
|
|
border: 1px solid lightgray; }
|
|
pre.programlisting { background: #2A2A2A;
|
|
border-left: 1px solid lightgray;
|
|
border-top: 1px solid lightgray; }
|
|
/* we need a light background in order for the images to be readable */
|
|
img { background: white }
|
|
}
|
|
@media (prefers-color-scheme: light) {
|
|
/* light theme */
|
|
html { background: white }
|
|
body { background: white }
|
|
th { border-bottom: 2px solid gray; }
|
|
h1, h2, h3, h4, h5 { background: lightgray; }
|
|
code, var, code a { color: darkred;
|
|
background: whitesmoke; }
|
|
a { color: #000; }
|
|
pre { background: whitesmoke;
|
|
color: black;
|
|
/* mark longer code block with stripe on the left */
|
|
border-left: 5px solid darkred;
|
|
padding-left: 10px; }
|
|
pre.screen { background: #EEE;
|
|
border: 1px solid black; }
|
|
pre.programlisting { background: #EEEEEE;
|
|
border-left: 1px solid black;
|
|
border-top: 1px solid black; }
|
|
}
|
|
|
|
body {
|
|
margin: 1em 125px 0 10%;
|
|
line-height: 1.5em;
|
|
padding: 0 2em 1em 2em;
|
|
font: 13px Verdana,Arial, sans-serif
|
|
}
|
|
ul, dd, dl, dt { margin-top: 0; margin-bottom: 0; }
|
|
p, code, td, dl, dt {
|
|
line-height: 1.5em;
|
|
}
|
|
table {
|
|
font: inherit;
|
|
border-collapse: collapse;
|
|
}
|
|
th, td {
|
|
vertical-align: top;
|
|
}
|
|
h1, h2, h3 { padding-left: 15px; }
|
|
h4, h5 { padding-left: 5px; }
|
|
code, pre {
|
|
font-size: 1em;
|
|
font-family: monospace;
|
|
}
|
|
var {
|
|
font-size: 1em;
|
|
}
|
|
/* links inside code appear the same as the code itself */
|
|
code a {
|
|
font-weight: normal;
|
|
text-decoration: none;
|
|
}
|
|
/* but get an underline when hovering */
|
|
code a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
/* ordinary links appear in bold */
|
|
a { font-weight: bold; }
|
|
pre.verbatim {
|
|
margin: 0 0 0 0;
|
|
}
|
|
pre {
|
|
overflow: auto;
|
|
}
|
|
pre.screen {
|
|
font-weight: bold;
|
|
padding: 0.5em;
|
|
}
|
|
pre.programlisting {
|
|
padding: 0.5em;
|
|
}
|
|
div p { padding: 0 2em }
|
|
li p { padding: 0; margin: 0 }
|
|
hr { display: none; }
|
|
div.funcsynopsis p {
|
|
text-indent: -2em;
|
|
}
|
|
div.variablelist {
|
|
padding: 0 2em;
|
|
}
|
|
.type, .funcsynopsis, .symbol {
|
|
font-family: monospace;
|
|
}
|
|
.type, .symbol, .replaceable {
|
|
white-space: nowrap;
|
|
}
|
|
|
|
-->
|
|
</style>
|
|
|
|
|
|
</head>
|
|
|
|
<body lang="en">
|
|
<div class="section-level-extent" id="Characters">
|
|
<div class="nav-panel">
|
|
<p>
|
|
Next: <a href="Conses.html" accesskey="n" rel="next">Conses</a>, Previous: <a href="Numbers.html#Numbers" accesskey="p" rel="prev">Numbers</a>, Up: <a href="Standards.html" accesskey="u" rel="up">Standards</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indexes.html" title="Index" rel="index">Index</a>]</p>
|
|
</div>
|
|
<h3 class="section" id="Characters-1">2.11 Characters</h3>
|
|
|
|
<p>ECL is fully ANSI Common-Lisp compliant in all aspects of the character data type, with the following peculiarities.
|
|
</p>
|
|
|
|
<ul class="mini-toc">
|
|
<li><a href="Characters.html#Characters-_002d-Unicode-vs_002e-POSIX-locale" accesskey="1">Unicode vs. POSIX locale</a></li>
|
|
<li><a href="Characters.html#Characters-_002d-Newline-characters" accesskey="2"><code class="code">#\Newline</code> characters</a></li>
|
|
<li><a href="Characters.html#Characters-_002d-C-Reference" accesskey="3">C Reference</a></li>
|
|
</ul>
|
|
<hr>
|
|
<div class="subsection-level-extent" id="Characters-_002d-Unicode-vs_002e-POSIX-locale">
|
|
<div class="nav-panel">
|
|
<p>
|
|
Next: <a href="Characters.html#Characters-_002d-Newline-characters" accesskey="n" rel="next"><code class="code">#\Newline</code> characters</a>, Up: <a href="Characters.html#Characters" accesskey="u" rel="up">Characters</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indexes.html" title="Index" rel="index">Index</a>]</p>
|
|
</div>
|
|
<h4 class="subsection" id="Unicode-vs_002e-POSIX-locale">2.11.1 Unicode vs. POSIX locale</h4>
|
|
<a class="index-entry-id" id="index-_002d_002denable_002dunicode-_005b32_007c16_007cno_005d"></a>
|
|
|
|
<p>There are two ways of building ECL: with C or with Unicode character codes. These build modes are accessed using the <code class="code">--disable-unicode</code> and <code class="code">--enable-unicode</code> configuration options, the last one being the default.
|
|
</p>
|
|
<p>When using C characters we are actually relying on the char type of the C language, using the C library functions for tasks such as character conversions, comparison, etc. In this case characters are typically 8 bit wide and the character order and collation are determines by the current POSIX or C locale. This is not very accurate, leaves out many languages and character encodings but it is sufficient for small applications that do not need multilingual support.
|
|
</p>
|
|
<p>When no option is specified ECL builds with support for a larger character set, the Unicode 6.0 standard. This uses 24 bit large character codes, also known as <em class="dfn">codepoints</em>, with a large database of character properties which include their nature (alphanumeric, numeric, etc), their case, their collation properties, whether they are standalone or composing characters, etc.
|
|
</p>
|
|
<ul class="mini-toc">
|
|
<li><a href="Characters.html#Character-types" accesskey="1">Character types</a></li>
|
|
<li><a href="Characters.html#Character-names" accesskey="2">Character names</a></li>
|
|
</ul>
|
|
<div class="subsubsection-level-extent" id="Character-types">
|
|
<h4 class="subsubsection">2.11.1.1 Character types</h4>
|
|
<a class="index-entry-id" id="index-extended_002dchar"></a>
|
|
<p>If ECL is compiled without Unicode support, all characters are implemented using 8-bit codes and the type <code class="code">extended-char</code> is empty. If compiled with Unicode support, characters are implemented using 24 bits and the <code class="code">extended-char</code> type covers characters above code 255.
|
|
</p><table class="multitable">
|
|
<thead><tr><th width="33%">Type</th><th width="33%">Without Unicode</th><th width="33%">With Unicode</th></tr></thead>
|
|
<tbody><tr><td width="33%">standard-char</td><td width="33%">#\Newline,32-126</td><td width="33%">#\Newline,32-126</td></tr>
|
|
<tr><td width="33%">base-char</td><td width="33%">0-255</td><td width="33%">0-255</td></tr>
|
|
<tr><td width="33%">extended-char</td><td width="33%">-</td><td width="33%">256-16777215</td></tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
<div class="subsubsection-level-extent" id="Character-names">
|
|
<h4 class="subsubsection">2.11.1.2 Character names</h4>
|
|
<a class="index-entry-id" id="index-standard_002dchar"></a>
|
|
<p>All characters have a name. For non-printing characters between 0 and 32, and for 127 we use the ordinary ASCII names. Characters above 127 are printed and read using hexadecimal Unicode notation, with a U followed by 24 bit hexadecimal number, as in <code class="code">U0126</code>.
|
|
</p>
|
|
<div class="float" id="tab_003aexample_002dchar_002dnames">
|
|
<table class="multitable">
|
|
<thead><tr><th>Character</th><th>Code</th></tr></thead>
|
|
<tbody><tr><td>#\Null</td><td>0</td></tr>
|
|
<tr><td>#\Ack</td><td>1</td></tr>
|
|
<tr><td>#\Bell</td><td>7</td></tr>
|
|
<tr><td>#\Backspace</td><td>8</td></tr>
|
|
<tr><td>#\Tab</td><td>9</td></tr>
|
|
<tr><td>#\Newline</td><td>10</td></tr>
|
|
<tr><td>#\Linefeed</td><td>10</td></tr>
|
|
<tr><td>#\Page</td><td>12</td></tr>
|
|
<tr><td>#\Esc</td><td>27</td></tr>
|
|
<tr><td>#\Escape</td><td>27</td></tr>
|
|
<tr><td>#\Space</td><td>32</td></tr>
|
|
<tr><td>#\Rubout</td><td>127</td></tr>
|
|
<tr><td>#\U0080</td><td>128</td></tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="type-number-float"><p><strong class="strong">Table 2.6
|
|
</strong></p></div></div>
|
|
<p>Note that <code class="code">#\Linefeed</code> is synonymous with <code class="code">#\Newline</code> and thus is a member of <code class="code">standard-char</code>.
|
|
</p>
|
|
|
|
<hr>
|
|
</div>
|
|
</div>
|
|
<div class="subsection-level-extent" id="Characters-_002d-Newline-characters">
|
|
<div class="nav-panel">
|
|
<p>
|
|
Next: <a href="Characters.html#Characters-_002d-C-Reference" accesskey="n" rel="next">C Reference</a>, Previous: <a href="Characters.html#Characters-_002d-Unicode-vs_002e-POSIX-locale" accesskey="p" rel="prev">Unicode vs. POSIX locale</a>, Up: <a href="Characters.html#Characters" accesskey="u" rel="up">Characters</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indexes.html" title="Index" rel="index">Index</a>]</p>
|
|
</div>
|
|
<h4 class="subsection" id="g_t_0023_005cNewline-characters">2.11.2 <code class="code">#\Newline</code> characters</h4>
|
|
<p>Internally, ECL represents the <code class="code">#\Newline</code> character by a single code. However, when using external formats, ECL may parse character pairs as a single <code class="code">#\Newline</code>, and vice versa, use multiple characters to represent a single <code class="code">#\Newline</code>, see <a class="pxref" href="Streams.html#Streams-_002d-External-formats">External formats</a>.
|
|
</p>
|
|
|
|
<hr>
|
|
</div>
|
|
<div class="subsection-level-extent" id="Characters-_002d-C-Reference">
|
|
<div class="nav-panel">
|
|
<p>
|
|
Previous: <a href="Characters.html#Characters-_002d-Newline-characters" accesskey="p" rel="prev"><code class="code">#\Newline</code> characters</a>, Up: <a href="Characters.html#Characters" accesskey="u" rel="up">Characters</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indexes.html" title="Index" rel="index">Index</a>]</p>
|
|
</div>
|
|
<h4 class="subsection" id="C-Reference-11">2.11.3 C Reference</h4>
|
|
|
|
<ul class="mini-toc">
|
|
<li><a href="Characters.html#C-types" accesskey="1">C types</a></li>
|
|
<li><a href="Characters.html#Constructors" accesskey="2">Constructors</a></li>
|
|
<li><a href="Characters.html#Predicates" accesskey="3">Predicates</a></li>
|
|
<li><a href="Characters.html#Character-case" accesskey="4">Character case</a></li>
|
|
<li><a href="Characters.html#ANSI-Dictionary-7" accesskey="5">ANSI Dictionary</a></li>
|
|
</ul>
|
|
<div class="subsubsection-level-extent" id="C-types">
|
|
<h4 class="subsubsection">2.11.3.1 C types</h4>
|
|
<a class="anchor" id="ecl_005fbase_005fchar"></a><a class="index-entry-id" id="index-ecl_005fbase_005fchar"></a>
|
|
<a class="anchor" id="ecl_005fcharacter"></a><a class="index-entry-id" id="index-ecl_005fcharacter"></a>
|
|
<p>C character types
|
|
</p>
|
|
|
|
<p><b class="b">Type names</b>
|
|
</p>
|
|
<table class="multitable">
|
|
<tbody><tr><td>ecl_character</td><td>character</td></tr>
|
|
<tr><td>ecl_base_char</td><td>base-char</td></tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
<p><b class="b">Description</b>
|
|
</p>
|
|
<p>ECL defines two C types to hold its characters: <code class="code"><a class="ref" href="Characters.html#ecl_005fbase_005fchar">ecl_base_char</a></code> and <code class="code"><a class="ref" href="Characters.html#ecl_005fcharacter">ecl_character</a></code>.
|
|
</p>
|
|
<ul class="itemize mark-bullet">
|
|
<li>When ECL is built without Unicode, they both coincide and typically match <code class="code">unsigned char</code>, to cover the 256 codes that are needed.
|
|
</li><li>When ECL is built with Unicode, the two types are no longer equivalent, with <code class="code"><a class="ref" href="Characters.html#ecl_005fcharacter">ecl_character</a></code> being larger.
|
|
</li></ul>
|
|
|
|
<p>For your code to be portable and future proof, use both types to really express what you intend to do.
|
|
</p>
|
|
</div>
|
|
<div class="subsubsection-level-extent" id="Constructors">
|
|
<h4 class="subsubsection">2.11.3.2 Constructors</h4>
|
|
<a class="anchor" id="ECL_005fCODE_005fCHAR"></a><a class="index-entry-id" id="index-ECL_005fCODE_005fCHAR"></a>
|
|
<a class="anchor" id="ECL_005fCHAR_005fCODE"></a><a class="index-entry-id" id="index-ECL_005fCHAR_005fCODE"></a>
|
|
<a class="anchor" id="ecl_005fchar_005fcode"></a><a class="index-entry-id" id="index-ecl_005fchar_005fcode"></a>
|
|
<a class="anchor" id="ecl_005fbase_005fchar_005fcode"></a><a class="index-entry-id" id="index-ecl_005fbase_005fchar_005fcode"></a>
|
|
<p>Creating and extracting characters from Lisp objects
|
|
</p>
|
|
<h4 class="subsubheading" id="Functions-3">Functions</h4>
|
|
<dl class="first-deftypefn">
|
|
<dt class="deftypefn" id="index-ECL_005fCODE_005fCHAR-2"><span class="category-def">Macro: </span><span><code class="def-type">cl_object</code> <strong class="def-name">ECL_CODE_CHAR</strong> <code class="def-code-arguments">(ecl_character code);</code><a class="copiable-link" href='Characters.html#index-ECL_005fCODE_005fCHAR-2'> ¶</a></span></dt>
|
|
<dt class="deftypefnx def-cmd-deftypefn" id="index-ECL_005fCHAR_005fCODE-2"><span class="category-def">Macro: </span><span><code class="def-type">ecl_character</code> <strong class="def-name">ECL_CHAR_CODE</strong> <code class="def-code-arguments">(cl_object o);</code><a class="copiable-link" href='Characters.html#index-ECL_005fCHAR_005fCODE-2'> ¶</a></span></dt>
|
|
</dl>
|
|
<dl class="first-deftypefn first-deftypefun-alias-first-deftypefn">
|
|
<dt class="deftypefn deftypefun-alias-deftypefn" id="index-ecl_005fchar_005fcode-2"><span class="category-def">Function: </span><span><code class="def-type">ecl_character</code> <strong class="def-name">ecl_char_code</strong> <code class="def-code-arguments">(cl_object o);</code><a class="copiable-link" href='Characters.html#index-ecl_005fchar_005fcode-2'> ¶</a></span></dt>
|
|
<dt class="deftypefnx deftypefunx-alias-deftypefnx def-cmd-deftypefn" id="index-ecl_005fbase_005fchar_005fcode-2"><span class="category-def">Function: </span><span><code class="def-type">ecl_base_char</code> <strong class="def-name">ecl_base_char_code</strong> <code class="def-code-arguments">(cl_object o);</code><a class="copiable-link" href='Characters.html#index-ecl_005fbase_005fchar_005fcode-2'> ¶</a></span></dt>
|
|
<dd>
|
|
|
|
<p><b class="b">Description</b>
|
|
</p>
|
|
<p>These functions and macros convert back and forth from C character types to Lisp. The macros <code class="code"><a class="ref" href="Characters.html#ECL_005fCHAR_005fCODE">ECL_CHAR_CODE</a></code> and <code class="code"><a class="ref" href="Characters.html#ECL_005fCODE_005fCHAR">ECL_CODE_CHAR</a></code> perform this coercion without checking the arguments. The functions <code class="code"><a class="ref" href="Characters.html#ecl_005fchar_005fcode">ecl_char_code</a></code> and <code class="code"><a class="ref" href="Characters.html#ecl_005fbase_005fchar_005fcode">ecl_base_char_code</a></code>, on the other hand, verify that the argument has the right type and signal an error otherwise.
|
|
</p></dd></dl>
|
|
|
|
</div>
|
|
<div class="subsubsection-level-extent" id="Predicates">
|
|
<h4 class="subsubsection">2.11.3.3 Predicates</h4>
|
|
<a class="anchor" id="ecl_005fbase_005fchar_005fp"></a><a class="index-entry-id" id="index-ecl_005fbase_005fchar_005fp"></a>
|
|
<a class="anchor" id="ecl_005falpha_005fchar_005fp"></a><a class="index-entry-id" id="index-ecl_005falpha_005fchar_005fp"></a>
|
|
<a class="anchor" id="ecl_005falphanumeric_005fp"></a><a class="index-entry-id" id="index-ecl_005falphanumeric_005fp"></a>
|
|
<a class="anchor" id="ecl_005fgraphic_005fchar_005fp"></a><a class="index-entry-id" id="index-ecl_005fgraphic_005fchar_005fp"></a>
|
|
<a class="anchor" id="ecl_005fdigit_005fp"></a><a class="index-entry-id" id="index-ecl_005fdigit_005fp"></a>
|
|
<a class="anchor" id="ecl_005fstandard_005fchar_005fp"></a><a class="index-entry-id" id="index-ecl_005fstandard_005fchar_005fp"></a>
|
|
<p>C predicates for Lisp characters
|
|
</p>
|
|
<h4 class="subsubheading" id="Functions-4">Functions</h4>
|
|
<dl class="first-deftypefn first-deftypefun-alias-first-deftypefn">
|
|
<dt class="deftypefn deftypefun-alias-deftypefn" id="index-ecl_005fbase_005fchar_005fp-1"><span class="category-def">Function: </span><span><code class="def-type">bool</code> <strong class="def-name">ecl_base_char_p</strong> <code class="def-code-arguments">(ecl_character c);</code><a class="copiable-link" href='Characters.html#index-ecl_005fbase_005fchar_005fp-1'> ¶</a></span></dt>
|
|
<dt class="deftypefnx deftypefunx-alias-deftypefnx def-cmd-deftypefn" id="index-ecl_005falpha_005fchar_005fp-1"><span class="category-def">Function: </span><span><code class="def-type">bool</code> <strong class="def-name">ecl_alpha_char_p</strong> <code class="def-code-arguments">(ecl_character c);</code><a class="copiable-link" href='Characters.html#index-ecl_005falpha_005fchar_005fp-1'> ¶</a></span></dt>
|
|
<dt class="deftypefnx deftypefunx-alias-deftypefnx def-cmd-deftypefn" id="index-ecl_005falphanumericp"><span class="category-def">Function: </span><span><code class="def-type">bool</code> <strong class="def-name">ecl_alphanumericp</strong> <code class="def-code-arguments">(ecl_character c);</code><a class="copiable-link" href='Characters.html#index-ecl_005falphanumericp'> ¶</a></span></dt>
|
|
<dt class="deftypefnx deftypefunx-alias-deftypefnx def-cmd-deftypefn" id="index-ecl_005fgraphic_005fchar_005fp-1"><span class="category-def">Function: </span><span><code class="def-type">bool</code> <strong class="def-name">ecl_graphic_char_p</strong> <code class="def-code-arguments">(ecl_character c);</code><a class="copiable-link" href='Characters.html#index-ecl_005fgraphic_005fchar_005fp-1'> ¶</a></span></dt>
|
|
<dt class="deftypefnx deftypefunx-alias-deftypefnx def-cmd-deftypefn" id="index-ecl_005fdigitp"><span class="category-def">Function: </span><span><code class="def-type">bool</code> <strong class="def-name">ecl_digitp</strong> <code class="def-code-arguments">(ecl_character c);</code><a class="copiable-link" href='Characters.html#index-ecl_005fdigitp'> ¶</a></span></dt>
|
|
<dt class="deftypefnx deftypefunx-alias-deftypefnx def-cmd-deftypefn" id="index-ecl_005fstandard_005fchar_005fp-1"><span class="category-def">Function: </span><span><code class="def-type">bool</code> <strong class="def-name">ecl_standard_char_p</strong> <code class="def-code-arguments">(ecl_character c);</code><a class="copiable-link" href='Characters.html#index-ecl_005fstandard_005fchar_005fp-1'> ¶</a></span></dt>
|
|
<dd>
|
|
|
|
<p><b class="b">Description</b>
|
|
</p>
|
|
<p>These functions are equivalent to their Lisp equivalents but return C booleans.
|
|
</p></dd></dl>
|
|
|
|
</div>
|
|
<div class="subsubsection-level-extent" id="Character-case">
|
|
<h4 class="subsubsection">2.11.3.4 Character case</h4>
|
|
<a class="anchor" id="ecl_005fupper_005fcase_005fp"></a><a class="index-entry-id" id="index-ecl_005fupper_005fcase_005fp"></a>
|
|
<a class="anchor" id="ecl_005flower_005fcase_005fp"></a><a class="index-entry-id" id="index-ecl_005flower_005fcase_005fp"></a>
|
|
<a class="anchor" id="ecl_005fboth_005fcase_005fp"></a><a class="index-entry-id" id="index-ecl_005fboth_005fcase_005fp"></a>
|
|
<a class="anchor" id="ecl_005fchar_005fdowncase"></a><a class="index-entry-id" id="index-ecl_005fchar_005fdowncase"></a>
|
|
<a class="anchor" id="ecl_005fchar_005fupcase"></a><a class="index-entry-id" id="index-ecl_005fchar_005fupcase"></a>
|
|
<p>C functions related to the character case
|
|
</p>
|
|
<h4 class="subsubheading" id="Functions-5">Functions</h4>
|
|
<dl class="first-deftypefn first-deftypefun-alias-first-deftypefn">
|
|
<dt class="deftypefn deftypefun-alias-deftypefn" id="index-ecl_005fupper_005fcase_005fp-1"><span class="category-def">Function: </span><span><code class="def-type">bool</code> <strong class="def-name">ecl_upper_case_p</strong> <code class="def-code-arguments">(ecl_character c);</code><a class="copiable-link" href='Characters.html#index-ecl_005fupper_005fcase_005fp-1'> ¶</a></span></dt>
|
|
<dt class="deftypefnx deftypefunx-alias-deftypefnx def-cmd-deftypefn" id="index-ecl_005flower_005fcase_005fp-1"><span class="category-def">Function: </span><span><code class="def-type">bool</code> <strong class="def-name">ecl_lower_case_p</strong> <code class="def-code-arguments">(ecl_character c);</code><a class="copiable-link" href='Characters.html#index-ecl_005flower_005fcase_005fp-1'> ¶</a></span></dt>
|
|
<dt class="deftypefnx deftypefunx-alias-deftypefnx def-cmd-deftypefn" id="index-ecl_005fboth_005fcase_005fp-1"><span class="category-def">Function: </span><span><code class="def-type">bool</code> <strong class="def-name">ecl_both_case_p</strong> <code class="def-code-arguments">(ecl_character c);</code><a class="copiable-link" href='Characters.html#index-ecl_005fboth_005fcase_005fp-1'> ¶</a></span></dt>
|
|
<dt class="deftypefnx deftypefunx-alias-deftypefnx def-cmd-deftypefn" id="index-ecl_005fchar_005fdowncase-1"><span class="category-def">Function: </span><span><code class="def-type">ecl_character</code> <strong class="def-name">ecl_char_downcase</strong> <code class="def-code-arguments">(ecl_character c);</code><a class="copiable-link" href='Characters.html#index-ecl_005fchar_005fdowncase-1'> ¶</a></span></dt>
|
|
<dt class="deftypefnx deftypefunx-alias-deftypefnx def-cmd-deftypefn" id="index-ecl_005fchar_005fupcase-1"><span class="category-def">Function: </span><span><code class="def-type">ecl_character</code> <strong class="def-name">ecl_char_upcase</strong> <code class="def-code-arguments">(ecl_character c);</code><a class="copiable-link" href='Characters.html#index-ecl_005fchar_005fupcase-1'> ¶</a></span></dt>
|
|
<dd>
|
|
|
|
<p><b class="b">Description</b>
|
|
</p>
|
|
<p>These functions check or change the case of a character. Note that in a Unicode context, the output of these functions might not be accurate (for instance when the uppercase character has two or more codepoints).
|
|
</p></dd></dl>
|
|
|
|
</div>
|
|
<div class="subsubsection-level-extent" id="ANSI-Dictionary-7">
|
|
<h4 class="subsubsection">2.11.3.5 ANSI Dictionary</h4>
|
|
<p>Common Lisp and C equivalence
|
|
</p>
|
|
<table class="multitable">
|
|
<thead><tr><th>Lisp symbol</th><th>C function</th></tr></thead>
|
|
<tbody><tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_chareq.htm">char=</a></td><td>cl_object cl_charE(cl_narg narg, ...)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_chareq.htm">char/=</a></td><td>cl_object cl_charNE(cl_narg narg, ...)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_chareq.htm">char<</a></td><td>cl_object cl_charL(cl_narg narg, ...)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_chareq.htm">char></a></td><td>cl_object cl_charG(cl_narg narg, ...)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_chareq.htm">char<=</a></td><td>cl_object cl_charLE(cl_narg narg, ...)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_chareq.htm">char>=</a></td><td>cl_object cl_charGE(cl_narg narg, ...)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_chareq.htm">char-equal</a></td><td>cl_object cl_char_equal(cl_narg narg, ...)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_chareq.htm">char-not-equal</a></td><td>cl_object cl_char_not_equal(cl_narg narg, ...)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_chareq.htm">char-lessp</a></td><td>cl_object cl_char_lessp(cl_narg narg, ...)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_chareq.htm">char-greaterp</a></td><td>cl_object cl_char_greaterp(cl_narg narg, ...)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_chareq.htm">char-not-greaterp</a></td><td>cl_object cl_char_not_greaterp(cl_narg narg, ...)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_chareq.htm">char-not-lessp</a></td><td>cl_object cl_char_not_lessp(cl_narg narg, ...)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_ch.htm">character</a></td><td>cl_object cl_character(cl_object char_designator)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_chp.htm">characterp</a></td><td>cl_object cl_characterp(cl_object object)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_alpha_.htm">alpha-char-p</a></td><td>cl_object cl_alpha_char_p(cl_object character)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_alphan.htm">alphanumericp</a></td><td>cl_object cl_alphanumericp(cl_object character)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_digit_.htm">digit-char</a></td><td>cl_object cl_digit_char(cl_narg narg, cl_object character, ...)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_digi_1.htm">digit-char-p</a></td><td>cl_object cl_digit_char_p(cl_narg narg, cl_object character, ...)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_graphi.htm">graphic-char-p</a></td><td>cl_object cl_graphic_char_p(cl_object character)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_std_ch.htm">standard-char-p</a></td><td>cl_object cl_standard_char_p(cl_object character)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_char_u.htm">char_upcase</a></td><td>cl_object cl_char_upcase(cl_object character)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_char_u.htm">char-downcase</a></td><td>cl_object cl_char_downcase(cl_object character)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_upper_.htm">upper-case-p</a></td><td>cl_object cl_upper_case_p(cl_object character)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_upper_.htm">lower-case-p</a></td><td>cl_object cl_lower_case_p(cl_object character)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_upper_.htm">both-case-p</a></td><td>cl_object cl_both_case_p(cl_object character)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_char_c.htm">char-code</a></td><td>cl_object cl_char_code(cl_object character)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_char_i.htm">char-int</a></td><td>cl_object cl_char_int(cl_object character)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_code_c.htm">code-char</a></td><td>cl_object cl_code_char(cl_object code)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_char_n.htm">char-name</a></td><td>cl_object cl_char_name(cl_object character)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/f_name_c.htm">name-char</a></td><td>cl_object cl_name_char(cl_object name)</td></tr>
|
|
<tr><td><a class="url" href="http://www.lispworks.com/documentation/HyperSpec/Body/v_char_c.htm">char-code-limit</a></td><td>ECL_CHAR_CODE_LIMIT</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
<div class="nav-panel">
|
|
<p>
|
|
Next: <a href="Conses.html" accesskey="n" rel="next">Conses</a>, Previous: <a href="Numbers.html#Numbers" accesskey="p" rel="prev">Numbers</a>, Up: <a href="Standards.html" accesskey="u" rel="up">Standards</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indexes.html" title="Index" rel="index">Index</a>]</p>
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|