berry
berry copied to clipboard
Add string.startswith and string.endswith
See @405. Add:
string.startswith(hay:string, needle:string [, case_insensitive:bool]) -> boolstring.endswith(hay:string, needle:string [, case_insensitive:bool]) -> bool
These new methods are lightweight, allow for case sensitive or case insensitive matches, and don't need to allocate any temporary object.