SUBSTRING
Look into the SUBSTRING function.
So basically take the length of the sting you wish to analize, then SUBSTRING through, looking at each char. If it is the char that you are interested in then do whatever wth it.
This is the process you require. Yu simply wish to beak the string don until you reach th char you identified.
Goodlook with the process.