Added stringbuilder append approach
 to replace spaces from a string