you need to implement a character search, I'll assume that you already have something like
Hello-Wolrd-I-am-stux.
a character search will go through the string test each character starting from H to the last character x,
then you can test if its equal to -
if false you can store that character in a string and continue testing the next
if true you replace that and store " " instead of the character -
That is how I would do it. hope the knowledge helps. try it provide source code and we will correct were needed.