Kaya 0.5.3 reference for Builtins::setIndex

List of functions and data types in Builtins

Void setIndex(String s, Char c, Int i)

Arguments

Usage

Sets the ith character of the given String to the given character. The index starts at zero.

str = "abcdefg";
setIndex(str,'-',4); // str = "abcd-fg"

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