View Javadoc

1   package org.opensync.tools;
2   
3   /***
4    *	This class provides some methods to manipulate strings
5    *	in Insite Interactive
6    */
7   
8   public class StringUtils
9   {
10  
11  public static String replace(String str1, String str2, String str3)
12  {
13  	int ind;
14  	while( (ind = str1.indexOf(str2)) != -1)
15  		str1 = str1.substring(0,ind) + str3 + str1.substring(ind + str2.length());
16  	return str1;
17  }
18  
19  public static String getTrimmed(String str)
20  {
21  	if(str != null)
22  		return str.trim();
23  	else
24  		return str;
25  }
26  
27  }