public static void main(String[] args) {
String s = "\t hello ";
System.out.println("s=\"" + s.trim()+"\"");
}
s="hello" public static String trim(StringBuilder s, char toTrim) {
int originalLen = s.length();
int len = s.length();
int st = 0;
while ((st < len) && (s.charAt(st) == toTrim)) {
st++;
}
while ((st < len) && (s.charAt(len - 1) == toTrim)) {
len--;
}
return ((st > 0) || (len < originalLen)) ? s.substring(st, len) : s.toString();
}
public static void main(String[] args) {
String s = "___hello_";
System.out.println("s=\"" + trim(new StringBuilder(s), '_')+"\"");
}
s="hello"
Remote call EJB on jboss on multihomed linux
Too many open files - solution for jboss with apache server
How to archive folder without SVN files
JPA Second level query cache configuration with hibernate
Passing parameters to JSF Validator using Jboss Seam
Resizing multiple images from GIF to JPEG