A space (” “) character is used to separate two words. Some times we get the extra spaces in a string, which may case issues with your application.
trim() function to remove leading and trailing spaces from the string.
Welcome to TecAdmin.net!
join() functions. Here we will split the string with space characters as delimiter. The again join the all parts of string without any space.
You can also run both functions in single line.
- Trim Space Both Side:
- Trim Spaces Left Side:
- Trim Spaces Right Side: