I have a string,
"004-034556", that I want to split into two strings:
That means the first string will contain the characters before
'-', and the second string will contain the characters after
'-'. I also want to check if the string has
'-' in it. If not, I will throw an exception. How can I do this?