Menu

#306 String functions SubstringBefore/After

open
Server (57)
5
2014-08-18
2011-06-03
No

I'd like to see two new String functions: SubstringBefore and SubStringAfter. Examples:

SubstringBefore("Doe, John", ", ") ==> "Doe"

SubStringAfter("Doe, John", ", ") ==> "John"

Corner case 1: The separator occurs more than once. I'd expect it to use the first occurrence.
Corner case 2: The separator does not appear in the string. I'd expect the output string to be identical to the input string.

Discussion