1Prelude.strEnd(3kaya) Kaya module reference Prelude.strEnd(3kaya)
2
3
4
6 Prelude::strEnd - Return the end of a String.
7
9 String strEnd( String x, Int i )
10
12 x The string to examine
13
14 i The index to start from
15
17 Return the end of a string starting at character index i
18
19 strEnd(x,0) will return the entire string. If a negative i is given,
20 then it will be counted backwards from the end of the string.
21
22
23 x = "abcdef";
24 putStr(strEnd(x,2)); // "cdef"
25 putStr(strEnd(x,5)); // "f"
26 putStr(strEnd(x,6)); // ""
27 putStr(strEnd(x,7)); // OutOfBounds Exception thrown
28 putStr(strEnd(x,-3)); // "def"
29 putStr(strEnd(x,-8)); // OutOfBounds Exception thrown
30
32 Kaya standard library by Edwin Brady, Chris Morris and others
33 (kaya@kayalang.org). For further information see http://kayalang.org/
34
36 The Kaya standard library is free software; you can redistribute it
37 and/or modify it under the terms of the GNU Lesser General Public
38 License (version 2.1 or any later version) as published by the Free
39 Software Foundation.
40
42 Prelude.substr (3kaya)
43
44
45
46Kaya December 2010 Prelude.strEnd(3kaya)