The Undefeated Posted March 28, 2017 Share Posted March 28, 2017 How do I trade people with a space in their username? name.replaceAll(" ", "\\u00a0") This code doesn't work. 1 Quote Link to comment Share on other sites More sharing options...
Explv Posted March 28, 2017 Share Posted March 28, 2017 (edited) 24 minutes ago, The Undefeated said: How do I trade people with a space in their username? name.replaceAll(" ", "\\u00a0") This code doesn't work. Try: name = name.replace(' ', '\u00A0'); Edited March 28, 2017 by Explv 1 Quote Link to comment Share on other sites More sharing options...
Aiban Posted March 28, 2017 Share Posted March 28, 2017 3 minutes ago, Explv said: Are you sure you need to insert a nonbreaking space? If yes, then try: name = name.replace(' ', '\u00A0'); This worked for me Thanks! Quote Link to comment Share on other sites More sharing options...
The Undefeated Posted March 28, 2017 Author Share Posted March 28, 2017 12 minutes ago, Explv said: Are you sure you need to insert a nonbreaking space? If yes, then try: name = name.replace(' ', '\u00A0'); What if the username has more than 1 space? Quote Link to comment Share on other sites More sharing options...
Explv Posted March 28, 2017 Share Posted March 28, 2017 20 minutes ago, The Undefeated said: What if the username has more than 1 space? That will replace them all 1 Quote Link to comment Share on other sites More sharing options...
Juggles Posted March 28, 2017 Share Posted March 28, 2017 Just don't put a space in the username Quote Link to comment Share on other sites More sharing options...
The Undefeated Posted March 28, 2017 Author Share Posted March 28, 2017 2 hours ago, Juggles said: Just don't put a space in the username 1 Quote Link to comment Share on other sites More sharing options...