Sub GetChar($s As String, $pos As Integer) As Char


Returns the character at position $pos. The first character of $s has the index 1.


If $pos is greater than the length of $s, GetChar returns an empty string.


Parameters


  • $s ... String expression from which a character is returned.
  • $pos ... Integer expression. Position of the character to return. $pos is one-based.


Example:

Dim $s, $ch

$s = "This is a text"
$ch = GetChar($s, 6)
' returns $ch = "i"