Char at: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Bale
start page
 
imported>Bale
fix example. Thanks bordemstirs.
 
Line 22: Line 22:
code=
code=
<syntaxhighlight>
<syntaxhighlight>
substring( "Lorem Ipsum." , 4);
char_at( "Lorem Ipsum." , 3);
</syntaxhighlight>|
</syntaxhighlight>|
moreinfo=
moreinfo=

Latest revision as of 05:53, 29 November 2010

Function Syntax

string char_at(string source ,int index )

This function returns the character in source which is at position index.

Code Sample

Returns a portion of a string.

char_at( "Lorem Ipsum." , 3);

Would result in:

Returned: e