space « String « JSP-Servlet Q&A





1. trim string in java, remove white space    stackoverflow.com

<%=CMSStringUtility.toTitleCase(attrValues.getDisplayLabel())%> this returns a string with a leading white space character that I need to remove. I believe this is JAVA in a jsp file. I tried the following: <%=CMSStringUtility.toTitleCase(attrValues.getDisplayLabel()).trim()%> and <%=CMSStringUtility.toTitleCase(attrValues.getDisplayLabel().trim())%> I am a JSP ...