You are not logged in.
Announcement
Unanswered posts
|
Pages: 1

Hi All,
I want to use a method isBlank() in tmap, i have written the routine also but getting error... am attaching the screen shot of my code....
Can any one give a better solution for this..It could be a greatful
Thanks In Advance
Lmit
Offline

Hi Pedro,
Thank For your reply
isBlank() method is there in stringUtils which checks whether the string is whitespace, empty ("") or null.
the function of the method (which i want is)
I want to check whether is string is null or not.
Thanks,
Lmit
Offline

Hi Lmit
Sorry for my delay to answer.
Last time I imported routines.system.StringUtils. I think what you need is to import org.apache.commons.lang.StringUtils which contains isBlank() method.
Regards,
Pedro
Offline

You appear to have an error in isBlank.
public static boolean isBlank(String str) {
int strLen;
if (str == null || (strLen = str.length()) == 0) {
return true;
}
for (int i = 0; i < strLen; i++) {
if ((Character.isWhitespace(str.charAt(i)) == false)) {
return false;
}
}
return true;
}
Last edited by janhess (2012-05-02 10:11:08)
Offline
Pages: 1