KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > roller > ui > rendering > velocity > deprecated > OldStringUtils


1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. The ASF licenses this file to You
4 * under the Apache License, Version 2.0 (the "License"); you may not
5 * use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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 {
28     public static boolean isEmpty(String JavaDoc str)
29     {
30         if (str == null) return true;
31         return "".equals(str.trim());
32     }
33     
34     public static boolean isNotEmpty(String JavaDoc str)
35     {
36         return !isEmpty(str);
37     }
38     
39     public static String JavaDoc[] split(String JavaDoc str1, String JavaDoc str2)
40     {
41        return org.apache.commons.lang.StringUtils.split(str1, str2);
42     }
43     
44     public static String JavaDoc replace(String JavaDoc src, String JavaDoc target, String JavaDoc rWith)
45     {
46         return org.apache.commons.lang.StringUtils.replace(src, target, rWith);
47     }
48     
49     public static String JavaDoc replace(String JavaDoc src, String JavaDoc target, String JavaDoc rWith, int maxCount)
50     {
51         return org.apache.commons.lang.StringUtils.replace(src, target, rWith, maxCount);
52     }
53     
54     public static boolean equals(String JavaDoc str1, String JavaDoc str2)
55     {
56         return org.apache.commons.lang.StringUtils.equals(str1, str2);
57     }
58     
59     public static boolean isAlphanumeric(String JavaDoc str)
60     {
61         return org.apache.commons.lang.StringUtils.isAlphanumeric(str);
62     }
63     
64     public static String JavaDoc[] stripAll(String JavaDoc[] strs)
65     {
66         return org.apache.commons.lang.StringUtils.stripAll(strs);
67     }
68     
69     public static String JavaDoc left(String JavaDoc str, int length)
70     {
71         return org.apache.commons.lang.StringUtils.left(str, length);
72     }
73 }
74
Popular Tags