English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

For example,
"Peter is smart"----> "Peterissmart"

2006-07-23 22:15:39 · 3 answers · asked by Anonymous in Computers & Internet Software

not Java script but also Thanks

2006-07-23 22:22:45 · update #1

trim only cut the space of the header and trailer .Thanks

2006-07-24 00:26:26 · update #2

3 answers

public String cutSpaces( String phrase ) {

if( phrase == null ) return null;

String[] words = phrase.split(" ");
StringBuilder builder = new StringBuilder();

for( String word: words ) builder.append( word );

return builder.toString();
}

2006-07-24 08:48:02 · answer #1 · answered by BalRog 5 · 3 0

Peter Will this help

<%@ taglib uri="taglib.tld" prefix="str" %>

Replace #User with John


Dear #User,
.....
.....


Extract table from the variable htmlSource:



<%=htmlSource%>


Remove spaces, tabs and new lines from the right


<%=some_var%>

Extract first two symbols:


01/11/2001

Convert to lower case:



IT WILL BE ON THE LOWER CASE


Parse string and print tokens:




token is:


Parse text and print lines:




current line is: <%=currentLine%>

2006-07-24 05:19:10 · answer #2 · answered by Joe_Young 6 · 0 2

Use the "Trim" command. i think it is in the class String. (not sure)

2006-07-24 05:28:03 · answer #3 · answered by Anonymous · 0 2

fedest.com, questions and answers