strlen & substr doc updates...

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6171 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Bukz
2011-03-30 21:17:08 +00:00
parent 9a5a453386
commit 1bd3a16e0d
2 changed files with 24 additions and 10 deletions
+9
View File
@@ -135,6 +135,15 @@ docexample [sleep 1000 [ echo foo ]] [Prints 'foo' to the screen after 1 second.
docident [strcmp] [Determines if two strings are equal.];
docargument [A] [the first string] [] [0];
docargument [B] [the second string] [] [0];
docident [strlen] [Returns the length (in characters, including whitespace) of string S.];
docargument [S] [The string to check.];
docexample [echo (strlen "Hello world!")] [output: 12];
docident [substr] [Copies a substring out of the original];
docargument [S] [The original string.];
docargument [A] [The starting position.];
docargument [B] [The end position.];
docexample [echo (substr abcdefgh 2 5)] [Output: cde];
docexample [echo (substr abcdefgh 2)] [Output: cdefgh];
docident [while] [Loops the specified body while the condition evaluates to true.];
docargument [cond] [the condition] [0 (false) or anything else (true)] [0];
docargument [body] [the body to execute on each iteration] [] [0];
+15 -10
View File
@@ -351,9 +351,19 @@
</arguments>
<return token="N" description="the equality" valueNotes="1 (equal) or 0 (unequal)"/>
</command>
<command name="strlen">
<description>Returns the length (in characters, including whitespace) of string S.</description>
<arguments>
<argument token="S" description="STRING"/>
</arguments>
<references>
<identifierReference identifier="substr"/>
</references>
</command>
<command name="substr">
<description>Copys a substring out of the original.</description>
<description>Copies a substring out of the original.</description>
<arguments>
<argument token="S" description="the original string"/>
<argument token="A" description="start position"/>
@@ -376,8 +386,10 @@
<code><![CDATA[echo (substr abcdefgh 2)
cdefgh]]></code>
</example>
</examples>
</examples>
<references>
<identifierReference identifier="strlen"/>
</references>
</command>
<command name="if">
@@ -5261,13 +5273,6 @@ Output:
</references>
</variable>
<command name="strlen">
<description>length of string S</description>
<arguments>
<argument token="S" description="STRING"/>
</arguments>
</command>
<command name="l0">
<description>leading zeros for the number V to make it W chars wide</description>
<arguments>