Thursday, August 19, 2010

Fetching ASCII Code

The key to the most generic character encoding scheme is ASCII. I am sure many of us at some point of time have land up in situation where the ASCII representation is desired. It is must in scenarios while playing with bitwise operators for calculations. Siebel also gives us function which returns ASCII value for any character.
Function:
stringVar.charCodeAt(indexVar)

Example:
var sEnCode = "ABCDEFGH";
var sGetCode = sEnCode.charCodeAt(2)
This will return 67 as output as ASCII representation for C character is 67. More of this function is available on siebel support under document ID 513659.1

No comments: