Which functions would you chose to use to remove leading and trailing white spaces from a given string?
Share
Which functions would you chose to use to remove leading and trailing white spaces from a given string?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Answer:
here's ur answer dude
Explanation:
Simply use trim(). It only eliminate the start and end excess white spaces of a string. Since Java 11 String class has strip() method which is used to returns a string whose value is this string, with all leading and trailing white space removed.
hope it helps