Add note to clarify which value is returned when substring is empty
Add substringBefore() to extract the start of a string before given substring