This detects if you have a space at the end of a string. Add a space to the end of your answer to see how it works (only visible if your answer is long). The blue variable is the original input. The orange variable is the one without a space at the end.
You can use this in your projects. Credit is not required (I didn't create this) It only works if you have one space (¬_¬) tbh this is low quality :P