Add function to split a string based on '|' character.