The charAt task is used to get a character at a given index. The index of the first character in the string is "0", the second character is "1", and so on. When the index value is specified the return result will be the character at that index location in the string.
Potential Use Case
Suppose you have a long list of numbers and you want to verify that a certain number is indeed located at a certain space in the index. You could use the charAt task for that validation.
Input and output parameters are shown below.
||String||Required. The string to get a character from.|
||Number||Required. The index to get the character at.|
||String||The single character at the specified index.|
In this IAP example:
strreference value is the two word sentence "Hello World".
indexlocation is position "1" in the
The result of this task will return the letter "e" because the
characteris located in the number "1" position of the index. Remember the index starts with "0" and counts up from there.