String function to hide text after a character
Can anyone suggest a string function that will hide part of a string after a certain character? For example:
- Replace this: What I need to see - what I don't want to see in this report
- With this: What I need to see
NB: The number of characters before the "-" is dependent on user, so substr(str, start_pos, [length]) is usable, but not ideal.
Thanks in advance.