Difference between revisions of "Charat"

From Mesham
Jump to navigationJump to search
m (5 revisions imported)
 
(3 intermediate revisions by the same user not shown)
Line 9: Line 9:
  
 
  #include <string>
 
  #include <string>
  var a:="hello";
+
   
var c:=charat(a,2);
+
function void main() {
var d:=charat("test",0);
+
    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]]

Latest revision as of 15:44, 15 April 2019

Overview

This charat(s,n) function will return the character at position n of the string s.

Example

#include <string>

function void main() {
   var a:="hello";
   var c:=charat(a,2);
   var d:=charat("test",0);
};

Since: Version 0.41b