Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > f448deafa1de20c56618e7ac9c6ef5d7 > files > 40

Falcon-doc-0.9.6.6-1.fc14.noarch.rpm

<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <title>Class String - Class String</title>
   <link href="faldoc.css" rel="stylesheet" type="text/css"/>
   <link href="tabs.css" rel="stylesheet" type="text/css"/>
</head>
<body class="faldoc_body">
<div class="navitop">
   <div class="tabs">
      <ul>
         <li><a href="./index.html"><span>Main</span></a></li>
         <li><a href="./pages.html"><span>Related pages</span></a></li>
         <li><a href="./groups.html"><span>Groups</span></a></li>
         <li><a href="./funset.html"><span>Function sets</span></a></li>
         <li><a href="./classes.html"><span>Classes</span></a></li>
         <li><a href="./objects.html"><span>Objects</span></a></li>
         <li><a href="./functions.html"><span>All functions</span></a></li>
         <li><a href="./globals.html"><span>Globals</span></a></li>
         
      </ul>
   </div>
</div>
<hr/>

<h1 class="faldoc_title">Class String</h1>

<p class="faldoc_brief">Metaclass for string items. </p>
<p class="faldoc_funcdecl">
<b>class</b> String \
      <b>from</b> <a href="./class_BOM.html">BOM</a>
</p>


   <p class="faldoc_brief"><a href="#more">more...</a></p>
   <h2 class="faldoc_title">Summary</h2>
   <table class="faldoc_list">
   
      
         <tr><td><a href="#back">back()</a></td><td>Returns the first character in a string. </td></tr>
      
         <tr><td><a href="#charSize">charSize()</a></td><td>Returns or changes the size in bytes in this string. </td></tr>
      
         <tr><td><a href="#cmpi">cmpi()</a></td><td>Performs a lexicographic comparation of two strings, ignoring character case. </td></tr>
      
         <tr><td><a href="#endsWith">endsWith()</a></td><td>Check if a strings ends with a substring. </td></tr>
      
         <tr><td><a href="#escape">escape()</a></td><td>Escapes all the special characters in the string. </td></tr>
      
         <tr><td><a href="#esq">esq()</a></td><td>Escapes the quotes in this string. </td></tr>
      
         <tr><td><a href="#fill">fill()</a></td><td>Fills a string with a given character or substring. </td></tr>
      
         <tr><td><a href="#find">find()</a></td><td>Finds a substring. </td></tr>
      
         <tr><td><a href="#front">front()</a></td><td>Returns the first character in a string. </td></tr>
      
         <tr><td><a href="#ftrim">ftrim()</a></td><td>Trims front whitespaces in a string. </td></tr>
      
         <tr><td><a href="#join">join()</a></td><td>Joins the parameters into a new string. </td></tr>
      
         <tr><td><a href="#lower">lower()</a></td><td>Returns a lowercase version of this string. </td></tr>
      
         <tr><td><a href="#merge">merge()</a></td><td>Merges an array of strings into one. </td></tr>
      
         <tr><td><a href="#ptr">ptr()</a></td><td>Returns a pointer to raw data contained in this string. </td></tr>
      
         <tr><td><a href="#replace">replace()</a></td><td>Replaces the all the occurrences of a substring with another one. </td></tr>
      
         <tr><td><a href="#replicate">replicate()</a></td><td>Returns a new string that is created by replicating this one. </td></tr>
      
         <tr><td><a href="#rfind">rfind()</a></td><td>Finds a substring bakwards. </td></tr>
      
         <tr><td><a href="#rtrim">rtrim()</a></td><td>Trims trailing whitespaces in a string. </td></tr>
      
         <tr><td><a href="#split">split()</a></td><td>Subdivides a string in an array of substrings given a token substring. </td></tr>
      
         <tr><td><a href="#splittr">splittr()</a></td><td>Subdivides a string in an array of substrings given a token substring. </td></tr>
      
         <tr><td><a href="#startsWith">startsWith()</a></td><td>Check if a strings starts with a substring. </td></tr>
      
         <tr><td><a href="#toMemBuf">toMemBuf()</a></td><td>Convets this string into a Memory Buffer </td></tr>
      
         <tr><td><a href="#trim">trim()</a></td><td>Trims whitespaces from both ends of a string. </td></tr>
      
         <tr><td><a href="#unescape">unescape()</a></td><td>Unescapes all the special characters in the string. </td></tr>
      
         <tr><td><a href="#unesq">unesq()</a></td><td>Escapes the quotes in this string. </td></tr>
      
         <tr><td><a href="#upper">upper()</a></td><td>Returns an upper case version of this string. </td></tr>
      
         <tr><td><a href="#wmatch">wmatch()</a></td><td>Perform an old-style file-like jolly-based wildcard match. </td></tr>
      
   
   </table>





   <h3 class="faldoc_title">Inherited methods</h3>
   <table class="faldoc_list">
   
      <tr><td><a href="./class_BOM.html#__add">__add</a> from BOM&nbsp;</td><td>Overrides binary addition operand. </td></tr>
   
      <tr><td><a href="./class_BOM.html#__call">__call</a> from BOM&nbsp;</td><td>Overrides call operator "self()". </td></tr>
   
      <tr><td><a href="./class_BOM.html#__dec">__dec</a> from BOM&nbsp;</td><td>Overrides decrement unary prefix operand. </td></tr>
   
      <tr><td><a href="./class_BOM.html#__decpost">__decpost</a> from BOM&nbsp;</td><td>Overrides decrement unary postfix operand. </td></tr>
   
      <tr><td><a href="./class_BOM.html#__div">__div</a> from BOM&nbsp;</td><td>Overrides binary division operand. </td></tr>
   
      <tr><td><a href="./class_BOM.html#__getIndex">__getIndex</a> from BOM&nbsp;</td><td>Overrides array access operator [] </td></tr>
   
      <tr><td><a href="./class_BOM.html#__inc">__inc</a> from BOM&nbsp;</td><td>Overrides increment unary prefix operand. </td></tr>
   
      <tr><td><a href="./class_BOM.html#__incpost">__incpost</a> from BOM&nbsp;</td><td>Overrides increment unary postifx operand. </td></tr>
   
      <tr><td><a href="./class_BOM.html#__mod">__mod</a> from BOM&nbsp;</td><td>Overrides modulo operand. </td></tr>
   
      <tr><td><a href="./class_BOM.html#__mul">__mul</a> from BOM&nbsp;</td><td>Overrides binary multiplication operand. </td></tr>
   
      <tr><td><a href="./class_BOM.html#__pow">__pow</a> from BOM&nbsp;</td><td>Overrides power operand. </td></tr>
   
      <tr><td><a href="./class_BOM.html#__setIndex">__setIndex</a> from BOM&nbsp;</td><td>Overrides array write operator [] </td></tr>
   
      <tr><td><a href="./class_BOM.html#__sub">__sub</a> from BOM&nbsp;</td><td>Overrides binary subtraction operand. </td></tr>
   
      <tr><td><a href="./class_BOM.html#baseClass">baseClass</a> from BOM&nbsp;</td><td>Returns the class item from which an object has been instantiated. </td></tr>
   
      <tr><td><a href="./class_BOM.html#bound">bound</a> from BOM&nbsp;</td><td>Determines if an item is bound or not. </td></tr>
   
      <tr><td><a href="./class_BOM.html#className">className</a> from BOM&nbsp;</td><td>Returns the name of the class an instance is instantiated from. </td></tr>
   
      <tr><td><a href="./class_BOM.html#clone">clone</a> from BOM&nbsp;</td><td>Performs a deep copy of the item. </td></tr>
   
      <tr><td><a href="./class_BOM.html#compare">compare</a> from BOM&nbsp;</td><td>Performs a lexicographical comparison. </td></tr>
   
      <tr><td><a href="./class_BOM.html#derivedFrom">derivedFrom</a> from BOM&nbsp;</td><td>Checks if this item has a given parent. </td></tr>
   
      <tr><td><a href="./class_BOM.html#describe">describe</a> from BOM&nbsp;</td><td>Returns the deep contents of an item on a string representation. </td></tr>
   
      <tr><td><a href="./class_BOM.html#isCallable">isCallable</a> from BOM&nbsp;</td><td>Determines if an item is callable. </td></tr>
   
      <tr><td><a href="./class_BOM.html#len">len</a> from BOM&nbsp;</td><td>Retrieves the length of a collection </td></tr>
   
      <tr><td><a href="./class_BOM.html#metaclass">metaclass</a> from BOM&nbsp;</td><td>Returns the metaclass associated with this item. </td></tr>
   
      <tr><td><a href="./class_BOM.html#ptr">ptr</a> from BOM&nbsp;</td><td>Returns a raw memory pointer out of this data (as an integer). </td></tr>
   
      <tr><td><a href="./class_BOM.html#serialize">serialize</a> from BOM&nbsp;</td><td>Serialize the item on a stream for persistent storage. </td></tr>
   
      <tr><td><a href="./class_BOM.html#toString">toString</a> from BOM&nbsp;</td><td>Coverts the object to string. </td></tr>
   
      <tr><td><a href="./class_BOM.html#typeId">typeId</a> from BOM&nbsp;</td><td>Returns an integer indicating the type of this item. </td></tr>
   
   </table>



<a name="more"><h2 class="faldoc_title">Detailed description</h2></a>

<p class="faldoc_funcdecl">
<b>class</b> String \
      <b>from</b> <a href="./class_BOM.html">BOM</a>
</p>
<table class="faldoc_function">


</table>
<br/>
<p class="item_brief">Metaclass for string items. </p>
<p class="faldoc_text">This is the set of methods that can be applied to string items. </p>




   <h2 class="faldoc_title">Methods</h2>
   
      <h3 class="faldoc_funcname"><a name="back">back()</a></h3>
      <p class="item_brief">Returns the first character in a string. </p>
      <p class="faldoc_funcdecl">String.back( [count], [numeric], [remove] )</p>
      
         <table class="faldoc_function">
         
         <tr><td class="faldoc_optparam">count</td><td class="faldoc_optparamdesc">Number of characters to be taken (defaults to 1). </td></tr><tr><td class="faldoc_optparam">numeric</td><td class="faldoc_optparamdesc">If true, returns a character value instead of a string. </td></tr><tr><td class="faldoc_optparam">remove</td><td class="faldoc_optparamdesc">If true, remove also the character. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The first element or nil if the string is empty. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text"> This function returns a string containing one character from the end of this string, or eventually more characters in case a number > 1 is specified in <b>count</b>. </p>
<p class="faldoc_text"> If <b>remove</b> is true, then the character is removed and the string is shrinked. </p>
<p class="faldoc_text"> If <b>numeric</b> is true, the UNICODE value of the string character will be returned, otherwise the caller will receive a string containing the desired character. In this case, <b>count</b> parameter will be ignored and only one UNICODE value will be returned. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="charSize">charSize()</a></h3>
      <p class="item_brief">Returns or changes the size in bytes in this string. </p>
      <p class="faldoc_funcdecl">String.charSize( [bpc] )</p>
      
         <table class="faldoc_function">
         
         <tr><td class="faldoc_optparam">bpc</td><td class="faldoc_optparamdesc">New value for bytes per character (1, 2 or 4). </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc"> This string if <b>bpc</b> is given, or the current character size value if not given. </td></tr>
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="cmpi">cmpi()</a></h3>
      <p class="item_brief">Performs a lexicographic comparation of two strings, ignoring character case. </p>
      <p class="faldoc_funcdecl">String.cmpi( string )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">string</td><td class="faldoc_paramdesc">Second string to be compared with this one. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc"><0, 0 or >0, respectively if this string is less, equal or greater than the <b>string</b> parameter. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">The two strings are compared ignoring the case of latin characters contained in the strings. </p>
<p class="faldoc_text">If the first string is greater than the second, the function returns a number less than 0. If it's smaller, it returns a positive number. If the two strings are the same, ignoring the case of the characters, 0 is returned. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="endsWith">endsWith()</a></h3>
      <p class="item_brief">Check if a strings ends with a substring. </p>
      <p class="faldoc_funcdecl">String.endsWith( token, [icase] )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">token</td><td class="faldoc_paramdesc">The substring that will be compared with this string. </td></tr>
         <tr><td class="faldoc_optparam">icase</td><td class="faldoc_optparamdesc">If true, pefroms a case neutral check </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc"> True if <b>token</b> matches the end of this string, false otherwise. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text"> This method performs a comparation check at the end of the string. If this string ends with <b>token</b>, the function returns true. If <b>token</b> is larger than the string, the method will always return false, and if <b>token</b> is an empty string, it will always match. </p>
<p class="faldoc_text"> The optional parameter <b>icase</b> can be provided as true to have this method to perform a case insensitive match. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="escape">escape()</a></h3>
      <p class="item_brief">Escapes all the special characters in the string. </p>
      <p class="faldoc_funcdecl">String.escape( [full] )</p>
      
         <table class="faldoc_function">
         
         <tr><td class="faldoc_optparam">full</td><td class="faldoc_optparamdesc">If true, characters above UNICODE 127 are escaped as well. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">A new escaped string. </td></tr>
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="esq">esq()</a></h3>
      <p class="item_brief">Escapes the quotes in this string. </p>
      <p class="faldoc_funcdecl">String.esq( [inplace] )</p>
      
         <table class="faldoc_function">
         
         <tr><td class="faldoc_optparam">inplace</td><td class="faldoc_optparamdesc">if true, the source string is modified, saving memory. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc"> A new escaped string, if <b>inplace</b> is not given, or this same string if <b>inplace</b> is true. </td></tr>
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="fill">fill()</a></h3>
      <p class="item_brief">Fills a string with a given character or substring. </p>
      <p class="faldoc_funcdecl">String.fill( chr )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">chr</td><td class="faldoc_paramdesc">The character (unicode value) or substring used to refill this string. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The string itself. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This method fills the physical storage of the given string with a single character or a repeated substring. This can be useful to clean a string used repeatedly as input buffer. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="find">find()</a></h3>
      <p class="item_brief">Finds a substring. </p>
      <p class="faldoc_funcdecl">String.find( needle, [start], [end] )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">needle</td><td class="faldoc_paramdesc">Substring to search for. </td></tr>
         <tr><td class="faldoc_optparam">start</td><td class="faldoc_optparamdesc">Optional position from which to start the search in string. </td></tr><tr><td class="faldoc_optparam">end</td><td class="faldoc_optparamdesc">Optional position at which to end the search in string. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The position where the substring is found, or -1. </td></tr>
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="front">front()</a></h3>
      <p class="item_brief">Returns the first character in a string. </p>
      <p class="faldoc_funcdecl">String.front( [count], [numeric], [remove] )</p>
      
         <table class="faldoc_function">
         
         <tr><td class="faldoc_optparam">count</td><td class="faldoc_optparamdesc">Number of characters to be returned (1 by default). </td></tr><tr><td class="faldoc_optparam">numeric</td><td class="faldoc_optparamdesc">If true, returns a character value instead of a string. </td></tr><tr><td class="faldoc_optparam">remove</td><td class="faldoc_optparamdesc">If true, remove also the character. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The first element or nil if the string is empty. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text"> This method returns a string containing one character from the beginning of the string, or eventually more characters in case a number > 1 is specified in <b>count</b>. </p>
<p class="faldoc_text"> If <b>remove</b> is true, then the character is removed and the string is shrinked. </p>
<p class="faldoc_text"> If <b>numeric</b> is true, the UNICODE value of the string character will be returned, otherwise the caller will receive a string containing the desired character. In this case, <b>count</b> parameter will be ignored and only one UNICODE value will be returned. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="ftrim">ftrim()</a></h3>
      <p class="item_brief">Trims front whitespaces in a string. </p>
      <p class="faldoc_funcdecl">String.ftrim( [trimSet] )</p>
      
         <table class="faldoc_function">
         
         <tr><td class="faldoc_optparam">trimSet</td><td class="faldoc_optparamdesc">A set of characters that must be removed. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The trimmed version of the string. </td></tr>
         
            <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc">
            <table class="faldoc_raise">
            <tr><td class="faldoc_raiseitem"><a href="./class_AccessError.html">AccessError</a></td><td class="faldoc_raisedesc">if the given item is not a string. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text"> A new string, which is a copy of the original one with all characters in <b>trimSet</b> at the beginning of the string removed, is returned. If <b>trimSet</b> is not supplied, it defaults to space, tabulation characters, new lines and carriage returns. The original string is unmodified. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="join">join()</a></h3>
      <p class="item_brief">Joins the parameters into a new string. </p>
      <p class="faldoc_funcdecl">String.join( .. )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">..</td><td class="faldoc_paramdesc">. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">A new string created joining the parameters, left to right. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">If this string is not empty, it is copied between each joined string. </p>
<p class="faldoc_text">For example, the next code separates each value with ", " </p>
<pre class="faldoc_code">
&gt; ", ".join( "have", "a", "nice", "day" )
</pre>
<p class="faldoc_text"> If the parameters are not string, a standard <a href="./functions.html#toString">toString</a> conversion is tried. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="lower">lower()</a></h3>
      <p class="item_brief">Returns a lowercase version of this string. </p>
      <p class="faldoc_funcdecl">String.lower( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The lowercased string. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">All the Latin characters in the string are turned lowercase. Other characters are left untouched. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="merge">merge()</a></h3>
      <p class="item_brief">Merges an array of strings into one. </p>
      <p class="faldoc_funcdecl">String.merge( array )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">array</td><td class="faldoc_paramdesc">An array of strings to be merged. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">This string. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This method works as strMerge, using this string as separator between the strings in the array. </p>
<p class="faldoc_text">The function may be used in this way: </p>
<pre class="faldoc_code">
 a = " ".merge( [ "a", "string", "of", "words" ] )
printl( a ) // prints "a string of words"
</pre>
<p class="faldoc_text">If an element of the array is not a string, an error is raised. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="ptr">ptr()</a></h3>
      <p class="item_brief">Returns a pointer to raw data contained in this string. </p>
      <p class="faldoc_funcdecl">String.ptr( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">A string pointer. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This function returns a pointer value (stored in a Falcon integer) pointing to the raw data in the string. The string is not encoded in any format, and its character size can be 1, 2 or 4 bytes per character depending on the values previusly stored. The string is granted to be terminated by an appropriate "\\0" value of the correct size. The value exists and is valid only while the original string (this item) stays unchanged. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="replace">replace()</a></h3>
      <p class="item_brief">Replaces the all the occurrences of a substring with another one. </p>
      <p class="faldoc_funcdecl">String.replace( substr, repstr, [start], [end] )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">substr</td><td class="faldoc_paramdesc">The substring that will be replaced. </td></tr><tr><td class="faldoc_param">repstr</td><td class="faldoc_paramdesc">The string that will take the place of substr. </td></tr>
         <tr><td class="faldoc_optparam">start</td><td class="faldoc_optparamdesc">Optional start position in the string. </td></tr><tr><td class="faldoc_optparam">end</td><td class="faldoc_optparamdesc">Optional end position in the string. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">A copy of the string with the occourences of the searched substring replaced. </td></tr>
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="replicate">replicate()</a></h3>
      <p class="item_brief">Returns a new string that is created by replicating this one. </p>
      <p class="faldoc_funcdecl">String.replicate( times )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">times</td><td class="faldoc_paramdesc">Number of times the string must be replicated. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The new string. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">A nice shortcut. Also, this function performs the work efficiently, preallocating the needed space in one shot and avoiding the need to grow the string while replicating the original value. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="rfind">rfind()</a></h3>
      <p class="item_brief">Finds a substring bakwards. </p>
      <p class="faldoc_funcdecl">String.rfind( needle, [start], [end] )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">needle</td><td class="faldoc_paramdesc">Substring to search for. </td></tr>
         <tr><td class="faldoc_optparam">start</td><td class="faldoc_optparamdesc">Optional position from which to start the search in string. </td></tr><tr><td class="faldoc_optparam">end</td><td class="faldoc_optparamdesc">Optional position at which to end the search in string. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The position where the substring is found, or -1. </td></tr>
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="rtrim">rtrim()</a></h3>
      <p class="item_brief">Trims trailing whitespaces in a string. </p>
      <p class="faldoc_funcdecl">String.rtrim( [trimSet] )</p>
      
         <table class="faldoc_function">
         
         <tr><td class="faldoc_optparam">trimSet</td><td class="faldoc_optparamdesc">A set of characters that must be removed. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The trimmed version of the string. </td></tr>
         
            <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc">
            <table class="faldoc_raise">
            <tr><td class="faldoc_raiseitem"><a href="./class_AccessError.html">AccessError</a></td><td class="faldoc_raisedesc">if the given item is not a string. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text"> A new string, which is a copy of the original one with all characters in <b>trimSet</b> at the end of the string removed, is returned. If <b>trimSet</b> is not supplied, it defaults to space, tabulation characters, new lines and carriage returns. The original string is unmodified. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="split">split()</a></h3>
      <p class="item_brief">Subdivides a string in an array of substrings given a token substring. </p>
      <p class="faldoc_funcdecl">String.split( token, [count] )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">token</td><td class="faldoc_paramdesc">The token by which the string should be splitted. </td></tr>
         <tr><td class="faldoc_optparam">count</td><td class="faldoc_optparamdesc">Optional maximum split count. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">An array of strings containing the splitted string. </td></tr>
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="splittr">splittr()</a></h3>
      <p class="item_brief">Subdivides a string in an array of substrings given a token substring. </p>
      <p class="faldoc_funcdecl">String.splittr( token, [count] )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">token</td><td class="faldoc_paramdesc">The token by which the string should be splitted. </td></tr>
         <tr><td class="faldoc_optparam">count</td><td class="faldoc_optparamdesc">Optional maximum split count. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">An array of strings containing the splitted string. </td></tr>
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="startsWith">startsWith()</a></h3>
      <p class="item_brief">Check if a strings starts with a substring. </p>
      <p class="faldoc_funcdecl">String.startsWith( token, [icase] )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">token</td><td class="faldoc_paramdesc">The substring that will be compared with this string. </td></tr>
         <tr><td class="faldoc_optparam">icase</td><td class="faldoc_optparamdesc">If true, pefroms a case neutral check </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc"> True if <b>token</b> matches the beginning of this string, false otherwise. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text"> This method performs a comparation check at the beginning of the string. If this string starts with <b>token</b>, the function returns true. If <b>token</b> is larger than the string, the method will always return false, and if <b>token</b> is an empty string, it will always match. </p>
<p class="faldoc_text"> The optional parameter <b>icase</b> can be provided as true to have this method to perform a case insensitive match. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="toMemBuf">toMemBuf()</a></h3>
      <p class="item_brief">Convets this string into a Memory Buffer </p>
      <p class="faldoc_funcdecl">String.toMemBuf( [wordWidth] )</p>
      
         <table class="faldoc_function">
         
         <tr><td class="faldoc_optparam">wordWidth</td><td class="faldoc_optparamdesc">The memory buffer word width (defaults to string character size). </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The resulting membuf. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This function creates a membuf from a string. The resulting membuf has the same word width of the original string, which may be 1, 2 or 4 byte wide depending on the size needed to store its contents. It is possible to specify a different word width; in that case the function will be much less efficient (each character must be copied). </p>
<p class="faldoc_text">If wordWidth is set to zero, the resulting memory buffer will have 1 byte long elements, but the content of the string will be copied as-is, bytewise, regardless of its character size. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="trim">trim()</a></h3>
      <p class="item_brief">Trims whitespaces from both ends of a string. </p>
      <p class="faldoc_funcdecl">String.trim( [trimSet] )</p>
      
         <table class="faldoc_function">
         
         <tr><td class="faldoc_optparam">trimSet</td><td class="faldoc_optparamdesc">A set of characters that must be removed. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The trimmed version of the string. </td></tr>
         
            <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc">
            <table class="faldoc_raise">
            <tr><td class="faldoc_raiseitem"><a href="./class_AccessError.html">AccessError</a></td><td class="faldoc_raisedesc">if the given item is not a string. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text"> A new string, which is a copy of the original one with all characters in <b>trimSet</b> at both ends of the string removed, is returned. If <b>trimSet</b> is not supplied, it defaults to space, tabulation characters, new lines and carriage returns. The original string is unmodified. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="unescape">unescape()</a></h3>
      <p class="item_brief">Unescapes all the special characters in the string. </p>
      <p class="faldoc_funcdecl">String.unescape( [inplace] )</p>
      
         <table class="faldoc_function">
         
         <tr><td class="faldoc_optparam">inplace</td><td class="faldoc_optparamdesc">if true, the source string is modified, saving memory. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc"> A new unescaped string, if <b>inplace</b> is not given, or the <b>string</b> parameter if <b>inplace</b> is true. </td></tr>
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="unesq">unesq()</a></h3>
      <p class="item_brief">Escapes the quotes in this string. </p>
      <p class="faldoc_funcdecl">String.unesq( [inplace] )</p>
      
         <table class="faldoc_function">
         
         <tr><td class="faldoc_optparam">inplace</td><td class="faldoc_optparamdesc">if true, the source string is modified, saving memory. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc"> A new escaped string, if <b>inplace</b> is not given, or this same string if <b>inplace</b> is true. </td></tr>
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="upper">upper()</a></h3>
      <p class="item_brief">Returns an upper case version of this string. </p>
      <p class="faldoc_funcdecl">String.upper( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The uppercased string. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">All the Latin characters in the string are turned uppercase. Other characters are left untouched. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="wmatch">wmatch()</a></h3>
      <p class="item_brief">Perform an old-style file-like jolly-based wildcard match. </p>
      <p class="faldoc_funcdecl">String.wmatch( wildcard, [ignoreCase] )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">wildcard</td><td class="faldoc_paramdesc">A wildcard, possibly but not necessarily including a jolly character. </td></tr>
         <tr><td class="faldoc_optparam">ignoreCase</td><td class="faldoc_optparamdesc">If true, the latin 26 base letters case is ignored in matches. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">True if the string matches, false otherwise. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This function matches a wildcard that may contain jolly "*" or "?" characters against a string, eventually ignoring the case of the characters. This is a practical function to match file names against given patterns. A "?" in the wildcard represents any single character, while a "*" represents an arbitrary sequence of characters. </p>
<p class="faldoc_text">The wildcard must match completely the given string for the function to return true. </p>
<p class="faldoc_text">For example: </p>
<ul>
<li>"*" matches everything </li><li>"a?b" matches "aab", "adb" and so on </li><li>"a*b" matches "ab", "annnb" and so on </li>
</ul>
</p>
   

<hr/>
<div class="navibottom">
   <center>
      <a href="./index.html">Main</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./pages.html">Related pages</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./groups.html">Groups</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./funset.html">Function sets</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./classes.html">Classes</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./objects.html">Objects</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./functions.html">All functions</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./globals.html">Globals</a>
   </center>
</div>
</div>
<div class="faldoc_signature">Made with <a href="http://www.falconpl.org">faldoc 2.2.0</div>
</body>
</html>