trimspace
trimspace removes whitespace from both ends of a string.
Notes
- Use it when you want to normalize user input.
- It is broader than
trim, which removes custom characters.
trimspace removes whitespace from both ends of a string.
trim, which removes custom characters.