Showing posts with label tip. Show all posts
Showing posts with label tip. Show all posts

Wednesday, August 27, 2008

Don't forget about StringUtil!

StringUtil is yet another great useful utility class that does some nice work for you if used correctly.

Here some examples:

List myList
= StringUtil.detokenizeStringAsList("ABC, DEF, AVC, EWR, ASD" , ",", true);

This gives you a nice list of all the items in the given string and does a trim() on them.


Here the API info:

detokenizeStringAsList
public static java.util.List detokenizeStringAsList(java.lang.String input,
java.lang.String separator,
boolean trimsItems)

Given an input String and a separator String, this method returns a String List of tokens based on tokenizing with the String separator.

Parameters:input - String
separator - String
trimsItems - whether each item will be trimmed
Returns:
String array of tokens


Yes there is more then that, check out the API docs for more details: com.workbrain.util.StringUtil

Some versions ago the changed the name of the class
   StringHelper -> StringUtil

Friday, August 22, 2008

Workbrain / App Server versions

Here is something that I always wanted to know. An easy way to find out what version of Workbrain I'm using/working with and what server is it running on. It's as simple as one mouse click to find out. Go to the login screen of your Workbrain app, and click the "About" link in the lower right hand corner of the login box. See images below: