autodoc.git/
autodoc.xml
Branch:
Tag:
Non-build tags
All tags
No tags
1996-03-29
1996-03-29 22:33:22 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
6d49eb12468c9368eb31115e8e33c8b7f57d159e (
39
lines) (+
39
/-
0
)
[
Show
|
Annotate
]
Branch:
6d49eb12468c9368eb31115e8e33c8b7f57d159e
new index pages
Rev: doc/lpc/all.bmml:1.1
Rev: doc/lpc/efuns.bmml:1.1
3384:
</doc> </docgroup>
+
<docgroup homogen-name='range' homogen-type='method'>
+
<method name='range'/><doc placeholder='true'>
+
<text>
+
<p><tt>range</tt> - cut a slice of an array or string</p>
+
+
<tt><p>a [ b .. c ]<br/>
+
or<br/>
+
a [ .. c ]<br/>
+
or<br/>
+
a [ b .. ]<br/>
+
</p>
+
</tt>
+
<p>This operator cuts out a piece of an array or string. If a is an array
+
a[b..c] will return an array containing a[b], a[b+1], a[b+2] to a[c].
+
Given a string about the same thing will happen, except the the result
+
will be a string of course. If b is omitted, everything from the
+
beginning up to and including c will be included. If c is omitted
+
the result will include everything from (and including) b to the end.</p>
+
</text>
+
+
<group><example/><text>
+
<tt><p><matrix>
+
<r><c> "foobar"[0..3] </c><c> returns "foo" </c></r>
+
<r><c> "foobar"[4..6] </c><c> returns "bar" </c></r>
+
<r><c> ({1,2,3})[..2] </c><c> returns ({1,2}) </c></r>
+
<r><c> ({1,2,3})[2..] </c><c> returns ({2,3}) </c></r>
+
<r><c> ({1,2,3})[..] </c><c> returns ({1,2,3}) </c></r>
+
</matrix>
+
</p>
+
</tt>
+
operators</text></group>
+
+
<group><seealso/><text>
+
<p><ref to='index'>index</ref></p>
+
</text></group>
+
+
</doc>
+
</docgroup>
<docgroup homogen-name='read_bytes' homogen-type='method'> <method name='read_bytes'/><doc placeholder='true'> <text>