1Builtins.getIndex(3kaya)     Kaya module reference    Builtins.getIndex(3kaya)
2
3
4

NAME

6       Builtins::getIndex - Get a character from a String
7

SYNOPSIS

9       Char getIndex( String s, Int i )
10

ARGUMENTS

12       s The string
13
14       i The position in the string
15

DESCRIPTION

17       Get  a  character  from a String.  Gets the i th character of the given
18       String. The index starts at zero.
19
20
21    str = "abcdefg";
22    c = getIndex(str,0); // 'a'
23    c = getIndex(str,5); // 'f'
24
25       An Builtins.IllegalIndex (3kaya) exception is thrown if  i  is  out  of
26       bounds.
27

AUTHORS

29       Kaya   standard  library  by  Edwin  Brady,  Chris  Morris  and  others
30       (kaya@kayalang.org). For further information see http://kayalang.org/
31

LICENSE

33       The Kaya standard library is free software;  you  can  redistribute  it
34       and/or  modify  it  under  the  terms  of the GNU Lesser General Public
35       License (version 2.1 or any later version) as  published  by  the  Free
36       Software Foundation.
37
39       Builtins.setIndex (3kaya)
40
41
42
43Kaya                             December 2010        Builtins.getIndex(3kaya)
Impressum