01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. The ASF licenses this file to You
04: * under the Apache License, Version 2.0 (the "License"); you may not
05: * use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License. For additional information regarding
15: * copyright in this work, please see the NOTICE file in the top level
16: * directory of this distribution.
17: */
18: /*
19: * Created on Jun 3, 2004
20: */
21: package org.apache.roller.ui.rendering.velocity.deprecated;
22:
23: /**
24: * @author lance.lavandowska
25: */
26: public class OldStringUtils {
27: public static boolean isEmpty(String str) {
28: if (str == null)
29: return true;
30: return "".equals(str.trim());
31: }
32:
33: public static boolean isNotEmpty(String str) {
34: return !isEmpty(str);
35: }
36:
37: public static String[] split(String str1, String str2) {
38: return org.apache.commons.lang.StringUtils.split(str1, str2);
39: }
40:
41: public static String replace(String src, String target, String rWith) {
42: return org.apache.commons.lang.StringUtils.replace(src, target,
43: rWith);
44: }
45:
46: public static String replace(String src, String target,
47: String rWith, int maxCount) {
48: return org.apache.commons.lang.StringUtils.replace(src, target,
49: rWith, maxCount);
50: }
51:
52: public static boolean equals(String str1, String str2) {
53: return org.apache.commons.lang.StringUtils.equals(str1, str2);
54: }
55:
56: public static boolean isAlphanumeric(String str) {
57: return org.apache.commons.lang.StringUtils.isAlphanumeric(str);
58: }
59:
60: public static String[] stripAll(String[] strs) {
61: return org.apache.commons.lang.StringUtils.stripAll(strs);
62: }
63:
64: public static String left(String str, int length) {
65: return org.apache.commons.lang.StringUtils.left(str, length);
66: }
67: }
|