I want to create a function that returns a substring of a specific string from the beginning of said string up to but not including the start of another specific string. Ideas?
So something like:
substrUpTo(theStr, subStr)
so if I inputted substrUpTo("Today is my birthday", "my")
, it would return a substring of the first argument up to but not including where the second argument begins. (i.e. it would return "Today is "
)