Difference between revisions of "Charat"

From Mesham
Jump to navigationJump to search
m
Line 9: Line 9:
  
 
  #include <string>
 
  #include <string>
  var a:="hello";
+
  function void main() {
var c:=charat(a,2);
+
    var a:="hello";
var d:=charat("test",0);
+
    var c:=charat(a,2);
 +
    var d:=charat("test",0);
 +
};
  
 
''Since: Version 0.41b''
 
''Since: Version 0.41b''

Revision as of 14:30, 15 April 2013

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