Kaya 0.4.4 reference for Builtins::getIndex

List of functions and data types in Builtins

Char getIndex(String s, Int i)

Arguments

Usage

Get a character from a String. Gets the ith character of the given String. The index starts at zero.

str = "abcdefg";
c = getIndex(str,0); // 'a'
c = getIndex(str,5); // 'f'

An IllegalIndex exception is thrown if i is out of bounds.

Related

kaya@kayalang.org | Last modified 29 November 2011 | Supported by Durham CompSoc | Powered by Kaya