333 lines
5.6 KiB
HTML
333 lines
5.6 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html>
|
|
<head>
|
|
<title>Luadocs for utils/stringutil.lua</title>
|
|
<link rel="stylesheet" href="../../luadoc.css" type="text/css" />
|
|
<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
|
|
</head>
|
|
|
|
<body>
|
|
<div id="container">
|
|
|
|
<div id="product">
|
|
<div id="product_logo"></div>
|
|
<div id="product_name"><big><b></b></big></div>
|
|
<div id="product_description"></div>
|
|
</div> <!-- id="product" -->
|
|
|
|
<div id="main">
|
|
|
|
<div id="navigation">
|
|
|
|
|
|
<h1>LuaDoc</h1>
|
|
<ul>
|
|
|
|
<li><a href="../../index.html">Index</a></li>
|
|
|
|
</ul>
|
|
|
|
|
|
<!-- Module list -->
|
|
|
|
|
|
|
|
<!-- File list -->
|
|
|
|
<h1>Files</h1>
|
|
<ul>
|
|
|
|
<li>
|
|
<a href="../../files/utils/arrayutil.html">utils/arrayutil.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/blockedcache.html">utils/blockedcache.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/blockutil.html">utils/blockutil.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/color.html">utils/color.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/constants.html">utils/constants.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/fisheryates.html">utils/fisheryates.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/init.html">utils/init.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/interpolate.html">utils/interpolate.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/inventoryutil.html">utils/inventoryutil.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/list.html">utils/list.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/log.html">utils/log.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/mapmanipulator.html">utils/mapmanipulator.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/mathutil.html">utils/mathutil.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/noisemanager.html">utils/noisemanager.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/pathutil.html">utils/pathutil.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/stopwatch.html">utils/stopwatch.lua</a>
|
|
</li>
|
|
|
|
<li><strong>utils/stringutil.lua</strong></li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/tableutil.html">utils/tableutil.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/tango.html">utils/tango.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/test.html">utils/test.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/textureutil.html">utils/textureutil.lua</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="../../files/utils/transform.html">utils/transform.lua</a>
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> <!-- id="navigation" -->
|
|
|
|
<div id="content">
|
|
|
|
<h1>File <code>utils/stringutil.lua</code></h1>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2>Functions</h2>
|
|
<table class="function_list">
|
|
|
|
<tr>
|
|
<td class="name" nowrap><a href="#stringutil.concat">stringutil.concat</a> (...)</td>
|
|
<td class="summary">Concats all the given items by invoking tostring on them into one string.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="name" nowrap><a href="#stringutil.endswith">stringutil.endswith</a> (text, value)</td>
|
|
<td class="summary">Tests if the given text ends with the given value.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="name" nowrap><a href="#stringutil.split">stringutil.split</a> (text, split)</td>
|
|
<td class="summary">Splits the given text using the given split value.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="name" nowrap><a href="#stringutil.startswith">stringutil.startswith</a> (text, value)</td>
|
|
<td class="summary">Tests if the given text starts with the given value.</td>
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<br/>
|
|
<br/>
|
|
|
|
|
|
|
|
|
|
<h2><a name="functions"></a>Functions</h2>
|
|
<dl class="function">
|
|
|
|
|
|
|
|
<dt><a name="stringutil.concat"></a><strong>stringutil.concat</strong> (...)</dt>
|
|
<dd>
|
|
Concats all the given items by invoking tostring on them into one string.
|
|
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
|
|
<li>
|
|
...: The items to concat.
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3>Return value:</h3>
|
|
The concatenated items as string.
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
<dt><a name="stringutil.endswith"></a><strong>stringutil.endswith</strong> (text, value)</dt>
|
|
<dd>
|
|
Tests if the given text ends with the given value.
|
|
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
|
|
<li>
|
|
text: The text to check if it ends with the given value.
|
|
</li>
|
|
|
|
<li>
|
|
value: The value that text should end with.
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3>Return value:</h3>
|
|
true if the given text ends with the value.
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
<dt><a name="stringutil.split"></a><strong>stringutil.split</strong> (text, split)</dt>
|
|
<dd>
|
|
Splits the given text using the given split value. Returns the splitted text as List. If the string is empty or nil, the returned list will not contain any entries. If the string only contains a value without a separator, the list will contain one value, if it contains only the separator, two empty values.
|
|
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
|
|
<li>
|
|
text: The text to split.
|
|
</li>
|
|
|
|
<li>
|
|
split: The split value.
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3>Return value:</h3>
|
|
The list of splitted values.
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
<dt><a name="stringutil.startswith"></a><strong>stringutil.startswith</strong> (text, value)</dt>
|
|
<dd>
|
|
Tests if the given text starts with the given value.
|
|
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
|
|
<li>
|
|
text: The text to check if it starts with the given value.
|
|
</li>
|
|
|
|
<li>
|
|
value: The value that text should start with.
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3>Return value:</h3>
|
|
true if the given text starts with the value.
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> <!-- id="content" -->
|
|
|
|
</div> <!-- id="main" -->
|
|
|
|
<div id="about">
|
|
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
|
|
</div> <!-- id="about" -->
|
|
|
|
</div> <!-- id="container" -->
|
|
</body>
|
|
</html>
|