Difference between revisions of "Charat"
From Mesham
Jump to navigationJump to search (Created page with '== Overview == This charat[s,n] function will return the character at position ''n'' of the string ''s''. * '''Pass:''' A string and integer * '''Returns:''' A character == Ex…') |
m (5 revisions imported) |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
== Overview == | == Overview == | ||
| − | This charat | + | This charat(s,n) function will return the character at position ''n'' of the string ''s''. |
| − | * '''Pass:''' A | + | * '''Pass:''' A [[String]] and [[Int]] |
| − | * '''Returns:''' A | + | * '''Returns:''' A [[Char]] |
== Example == | == Example == | ||
| − | var a:="hello"; | + | #include <string> |
| − | + | ||
| + | function void main() { | ||
| + | var a:="hello"; | ||
| + | var c:=charat(a,2); | ||
| + | var d:=charat("test",0); | ||
| + | }; | ||
| + | |||
| + | ''Since: Version 0.41b'' | ||
[[Category:Function Library]] | [[Category:Function Library]] | ||
[[Category:String Functions]] | [[Category:String Functions]] | ||