Scroll to navigation

Prelude.strEnd(3kaya) Kaya module reference Prelude.strEnd(3kaya)

NAME

Prelude::strEnd - Return the end of a String.

SYNOPSIS

String strEnd( String x, Int i )

ARGUMENTS

x The string to examine
i The index to start from

DESCRIPTION

Return the end of a string starting at character index i
strEnd(x,0) will return the entire string. If a negative i is given, then it will be counted backwards from the end of the string.

x = "abcdef";
putStr(strEnd(x,2)); // "cdef"
putStr(strEnd(x,5)); // "f"
putStr(strEnd(x,6)); // ""
putStr(strEnd(x,7)); // OutOfBounds Exception thrown
putStr(strEnd(x,-3)); // "def"
putStr(strEnd(x,-8)); // OutOfBounds Exception thrown

AUTHORS

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

LICENSE

The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation.

RELATED

Prelude.substr (3kaya)
August 2014 Kaya