Skip to content
Reference > Methods

strCharAt(text,pos)

Definition

Character strCharAt(String text, Number pos)

Description

Returns a single character from a string at a given postion.

Parameter Definition

Name Type Description
text String The base string to get a character from
pos Number offset from first char

Examples

1
2
3
4
Character r1 = strCharAt("this",0); // r1 == t
Character r2 = strCharAt("this",1); // r2 == h
Object r3 = strCharAt("this",-10); // r3 == null
Object r4 = strCharAt("this",4); // r4 == null