The codePointAt task is used to retrieve the Unicode value for a character at a specific position in a string. The result will be a non-negative integer that is the code point value of the character at the given position.
Potential Use Case
This task method helps with multilingual text and localization. Let's say you have a dataset or list that contains a unique set of language characters. To handle the characters properly and compile your data according to the Unicode standard, you would use the codePointAt task and return the code point value for each character.
Input and output parameters are shown below.
||String||Required. The string to get the Unicode value from.|
||Number||The position of an element in
||Number||A number representing the code point value of the character at the given
In this example , the incoming
str is given the Reference variable of Hello World. The
pos number is "1", which equates to the letter "e" in the phrase "Hello World".
Remember, the first character position is 0, and the second character position is 1, and so on.
codePointValue that returns upon output is "101", which is the Unicode value that represents the small letter "e".