4 namespace ${glPackageBaseCommonUtil} {
\r
6 public class ${glSimpleStringUtil} {
\r
8 // ===================================================================================
\r
11 public static String Replace(String text, String fromText, String toText) {
\r
12 if(text == null || fromText == null || toText == null) {
\r
15 return text.Replace(fromText, toText);
\r
18 public static String InitCap(String str) {
\r
19 AssertObjectNotNull("str", str);
\r
20 return str.Substring(0, 1).ToUpper() + str.Substring(1);
\r
23 // -----------------------------------------------------
\r
26 protected static void AssertObjectNotNull(String variableName, Object value) {
\r
27 if (variableName == null) {
\r
28 String msg = "The value should not be null: variableName=" + variableName + " value=" + value;
\r
29 throw new SystemException(msg);
\r
31 if (value == null) {
\r
32 String msg = "The value should not be null: variableName=" + variableName;
\r
33 throw new SystemException(msg);
\r