<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>SphinxBase: include/sphinxbase/case.h File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript"> $(document).ready(initResizable); </script> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.3 --> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">SphinxBase <span id="projectnumber">0.6</span></div> </td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> </div> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> initNavTree('case_8h.html',''); </script> <div id="doc-content"> <div class="header"> <div class="summary"> <a href="#define-members">Defines</a> | <a href="#func-members">Functions</a> </div> <div class="headertitle"> <h1>include/sphinxbase/case.h File Reference</h1> </div> </div> <div class="contents"> <p>Locale-independent implementation of case swapping operation. <a href="#_details">More...</a></p> <div class="textblock"><code>#include <string.h></code><br/> <code>#include <sphinxbase/prim_type.h></code><br/> <code>#include <sphinxbase/sphinxbase_export.h></code><br/> </div> <p><a href="case_8h_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="define-members"></a> Defines</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3299c549655d5af1fcbc384ee7fd68e3"></a><!-- doxytag: member="case.h::UPPER_CASE" ref="a3299c549655d5af1fcbc384ee7fd68e3" args="(c)" --> #define </td><td class="memItemRight" valign="bottom"><a class="el" href="case_8h.html#a3299c549655d5af1fcbc384ee7fd68e3">UPPER_CASE</a>(c)   ((((c) >= 'a') && ((c) <= 'z')) ? (c-32) : c)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return upper case form for c. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a44403ce2c3f4378aca12ffb732f24cef"></a><!-- doxytag: member="case.h::LOWER_CASE" ref="a44403ce2c3f4378aca12ffb732f24cef" args="(c)" --> #define </td><td class="memItemRight" valign="bottom"><a class="el" href="case_8h.html#a44403ce2c3f4378aca12ffb732f24cef">LOWER_CASE</a>(c)   ((((c) >= 'A') && ((c) <= 'Z')) ? (c+32) : c)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return lower case form for c. <br/></td></tr> <tr><td colspan="2"><h2><a name="func-members"></a> Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">SPHINXBASE_EXPORT void </td><td class="memItemRight" valign="bottom"><a class="el" href="case_8h.html#a79d99e36b7c2c36dcc6f7f0df746384e">ucase</a> (char *str)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert str to all upper case. <a href="#a79d99e36b7c2c36dcc6f7f0df746384e"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">SPHINXBASE_EXPORT void </td><td class="memItemRight" valign="bottom"><a class="el" href="case_8h.html#ac0e30dac40f15762f39270f65bd8cdba">lcase</a> (char *str)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Convert str to all lower case. <a href="#ac0e30dac40f15762f39270f65bd8cdba"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">SPHINXBASE_EXPORT int32 </td><td class="memItemRight" valign="bottom"><a class="el" href="case_8h.html#ad276a997bd6709d986aa6e1e4e06c210">strcmp_nocase</a> (const char *str1, const char *str2)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">(FIXME! The implementation is incorrect!) Case insensitive string compare. <a href="#ad276a997bd6709d986aa6e1e4e06c210"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae7c2a7f29d72b9516a947f5c69a043db"></a><!-- doxytag: member="case.h::strncmp_nocase" ref="ae7c2a7f29d72b9516a947f5c69a043db" args="(const char *str1, const char *str2, size_t len)" --> SPHINXBASE_EXPORT int32 </td><td class="memItemRight" valign="bottom"><a class="el" href="case_8h.html#ae7c2a7f29d72b9516a947f5c69a043db">strncmp_nocase</a> (const char *str1, const char *str2, size_t len)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Like <a class="el" href="case_8h.html#ad276a997bd6709d986aa6e1e4e06c210" title="(FIXME! The implementation is incorrect!) Case insensitive string compare.">strcmp_nocase()</a> but with a maximum length. <br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <div class="textblock"><p>Locale-independent implementation of case swapping operation. </p> <p>This function implements ASCII-only case switching and comparison related operations, which do not depend on the locale and are guaranteed to exist on all versions of Windows. </p> <p>Definition in file <a class="el" href="case_8h_source.html">case.h</a>.</p> </div><hr/><h2>Function Documentation</h2> <a class="anchor" id="ac0e30dac40f15762f39270f65bd8cdba"></a><!-- doxytag: member="case.h::lcase" ref="ac0e30dac40f15762f39270f65bd8cdba" args="(char *str)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">SPHINXBASE_EXPORT void lcase </td> <td>(</td> <td class="paramtype">char * </td> <td class="paramname"><em>str</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Convert str to all lower case. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">str</td><td>is a string. </td></tr> </table> </dd> </dl> <p>Referenced by <a class="el" href="ngram__model_8c_source.html#l00299">ngram_model_casefold()</a>.</p> </div> </div> <a class="anchor" id="ad276a997bd6709d986aa6e1e4e06c210"></a><!-- doxytag: member="case.h::strcmp_nocase" ref="ad276a997bd6709d986aa6e1e4e06c210" args="(const char *str1, const char *str2)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">SPHINXBASE_EXPORT int32 strcmp_nocase </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>str1</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"><em>str2</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>(FIXME! The implementation is incorrect!) Case insensitive string compare. </p> <p>Return the usual -1, 0, +1, depending on str1 <, =, > str2 (case insensitive, of course). </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">str1</td><td>is the first string. </td></tr> <tr><td class="paramname">str2</td><td>is the second string. </td></tr> </table> </dd> </dl> <p>Definition at line <a class="el" href="case_8c_source.html#l00094">94</a> of file <a class="el" href="case_8c_source.html">case.c</a>.</p> <p>References <a class="el" href="case_8c_source.html#l00094">strcmp_nocase()</a>, and <a class="el" href="case_8h_source.html#l00092">UPPER_CASE</a>.</p> <p>Referenced by <a class="el" href="ngram__model_8c_source.html#l00064">ngram_file_name_to_type()</a>, <a class="el" href="ngram__model_8c_source.html#l00097">ngram_str_to_type()</a>, and <a class="el" href="case_8c_source.html#l00094">strcmp_nocase()</a>.</p> </div> </div> <a class="anchor" id="a79d99e36b7c2c36dcc6f7f0df746384e"></a><!-- doxytag: member="case.h::ucase" ref="a79d99e36b7c2c36dcc6f7f0df746384e" args="(char *str)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">SPHINXBASE_EXPORT void ucase </td> <td>(</td> <td class="paramtype">char * </td> <td class="paramname"><em>str</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Convert str to all upper case. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">str</td><td>is a string. </td></tr> </table> </dd> </dl> <p>Referenced by <a class="el" href="ngram__model_8c_source.html#l00299">ngram_model_casefold()</a>.</p> </div> </div> </div> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="case_8h.html">case.h</a> </li> <li class="footer">Generated on Tue Apr 19 2011 for SphinxBase by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li> </ul> </div> </body> </html>