How to append strings to the front of other strings?

I am programming a translator, and I have it so that it detects words with spaces both in front of and behind them, so I did "string.append(space);" where space equals " ". That added a space to the end, but I still need a space added to the front.
 
yourstring = " " + yourstring + " ";
Topic archived. No new replies allowed.