StringCodeAt - method of the Pm object
Description:
Returns the code of
Unicode character on the definde position in the string. If the character is from
ASCII table, then the return value is less than 128.
Syntax:
Long StringCodeAt(String sValue, Long nIndex)
Parameters:
sValue | (String) Source string expression. |
nIndex | (Long) Position of the character in the string (zero-based index). |
---|
Example:
JavaScriptVBScriptSelect and copy to clipboard
var s = "Promotic";
var nCode = Pm.StringCodeAt(s, 0);
// Returns 80
nCode = Pm.StringCodeAt(s, 3);
// Returns 109
nCode = Pm.StringCodeAt(s, 7);
// Returns 99
Dim s
s = "Promotic"
Dim nCode
nCode = Pm.StringCodeAt(s, 0)
' Returns 80
nCode = Pm.StringCodeAt(s, 3)
' Returns 109
nCode = Pm.StringCodeAt(s, 7)
' Returns 99