strins - Returns string B inserted into string A at position X.
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6384 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+29
-1
@@ -429,7 +429,35 @@
|
||||
<identifierReference identifier="substr"/>
|
||||
</references>
|
||||
</command>
|
||||
|
||||
|
||||
<command name="strins">
|
||||
<description>Returns string B inserted into string A at position X.</description>
|
||||
<examples>
|
||||
<example>
|
||||
<code><![CDATA[echo (strins "Hello world" " cruel" 5)]]></code>
|
||||
<explanation>Output: Hello cruel world</explanation>
|
||||
</example>
|
||||
<example>
|
||||
<code><![CDATA[tmp = "Hello world"; echo (strins $tmp " cruel" (strlen $tmp))]]></code>
|
||||
<explanation>Output: -1</explanation>
|
||||
</example>
|
||||
</examples>
|
||||
<arguments>
|
||||
<argument token="A" description="the original string"/>
|
||||
<argument token="B" description="the string to insert into the original"/>
|
||||
<argument token="P" description="the position at which to insert string B into string A"/>
|
||||
</arguments>
|
||||
<remarks>
|
||||
<remark>The third argument must be at least greater than -1, and 1 less than the length "(in characters)" of string A, otherwise use concat or concatword.</remark>
|
||||
</remarks>
|
||||
<references>
|
||||
<identifierReference identifier="concat"/>
|
||||
<identifierReference identifier="concatword"/>
|
||||
<identifierReference identifier="strlen"/>
|
||||
<identifierReference identifier="substr"/>
|
||||
</references>
|
||||
</command>
|
||||
|
||||
<command name="strpos">
|
||||
<description>Returns the position of a substring into another</description>
|
||||
<arguments>
|
||||
|
||||
Reference in New Issue
Block a user