File: substring.html

package info (click to toggle)
sludge 2.2.2-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,852 kB
  • sloc: cpp: 32,432; sh: 1,237; makefile: 634; xml: 284
file content (53 lines) | stat: -rwxr-xr-x 1,453 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<TITLE>substring</TITLE>
  <link rel="stylesheet" type="text/css" href="style.css" />
</head>
<BODY>
<HR>
<div align="center"><img id="headerGraphic" src="images/sludge300.png" alt="SLUDGE"/></div>
<h2>substring</h2>
<HR>

<H3>Syntax:</H3>

<P>
<pre class="syntax">substring (<i>thisString, start, numCharacters</i>);</pre>
</P>

<H3>Purpose:</H3>

<P>
Makes a new string, containing 0 or more characters from the string <i>thisString</i>. The new string will start with the character at position <i>start</i> and be <i>numCharacters</i> long. Note that the value of <i>start</i> is zero-based... the first character in the string is character 0, the second is character 1 and so on.
</P>

<H3>Return value:</H3>

<P>
The function returns the new string.
</P>

<H3>Example:</H3>

<P>
<pre>var a = substring (&quot;123456789&quot;, 2, 5);
# a now contains the string &quot;34567&quot;

var b = &quot;Oi! SLUDGE is great!&quot;;
var c = substring (b, 4, stringLength (b) - 4);
# c now contains the string &quot;SLUDGE is great!&quot;</pre>
</P>

<H3>See also:</H3>

<P>
<a href="stringLength.html">stringLength</a>
</P>

<P class="copyright-notice">SLUDGE and this SLUDGE documentation are <A HREF="Copyright.html">copyright</A> Hungry Software and contributors 2000-2012
</P>

<HR>
</BODY>
</html>