I am trying to replace a space character into a hyphen I have in my string.
String replaceText = \"AT AT\"; replaceText.replace(\' \', \'-\');
If you are replacing many strings you want to consider using StringBuilder for performance.
String replaceText = "AT AT"; StringBuilder sb = new StringBuilder(replaceText); sb.Replace(' ', '-');