This charat[s,n] function will return the character at position n of the string s.
var a:="hello"; var c:=charat[a,2];