prefix
prefix(str: String, n: Integer) : String
Returns first n characters of string str.
Examples:
prefix("abcdef", 3)returns"abc"prefix("abcdef", 0)returns""(empty string)
Bounds handling
If n is negative, then it is treated as 0 and an empty string is returned. If n is greater than the string length,
then the entire string is returned.
Examples:
prefix("abcdef", -3)returns""(empty string)prefix("abcdef", 10)returns"abcdef"(entire string)