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

NAME

6       Builtins::setIndex - Change a character in a String in-place
7

SYNOPSIS

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

ARGUMENTS

12       s The string
13
14       c The character to set (may not be a NULL)
15
16       i The position in the string
17

DESCRIPTION

19       Sets the i th character of the given String to the given character. The
20       index starts at zero.
21
22
23    str = "abcdefg";
24    setIndex(str,'-',4); // str = "abcd-fg"
25
26       An Builtins.IllegalIndex (3kaya) exception is thrown if  i  is  out  of
27       bounds.
28

AUTHORS

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

LICENSE

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