Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.8 generated on January 11 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## serp.util
Class Strings

    java.lang.Object
      |
      +--serp.util.Strings

public class Strings
extends Object

String utiltity methods.

Constructor Summary
`Strings()`

Method Summary
`static String` | `capitalize(String str)` Deprecated. Use the Jakarta Commons project's `StringUtils.capitalise` method.
`static String` | `getClassName(Class cls)` Return only the class name, without package.
`static String` | `getClassName(String fullName)` Return only the class name.
`static String` | `getPackageName(Class cls)` Return only the package, or empty string if none.
`static String` | `getPackageName(String fullName)` Return only the package, or empty string if none.
`static String` | `join(Object[] strings, String token)` Joins the given strings, placing the given token between them.
`static String[]` | `split(String str, String token, int max)` Splits the given string on the given token.
`static Class` | `toClass(String str, ClassLoader loader)` Return the class for the given string, correctly handling primitive types.

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Strings

    public Strings()

Method Detail

### capitalize

    public static String capitalize(String str)

  Deprecated. Use the Jakarta Commons project's `StringUtils.capitalise` method.

  Capitlizes the first letter of the given string. Null or empty strings are returned without modification.

### split

    public static String[] split(String str,
                                 String token,
                                 int max)

  Splits the given string on the given token. Follows the semantics of the Java 1.4 `String#split(String,int)` method, but does not treat the given token as a regular expression.

### join

    public static String join(Object[] strings,
                              String token)

  Joins the given strings, placing the given token between them.

### toClass

    public static Class toClass(String str,
                                ClassLoader loader)

  Return the class for the given string, correctly handling primitive types. If the given class loader is null, the context loader of the current thread will be used.
  Throws:
    `RuntimeException` - on load error

### getClassName

    public static String getClassName(Class cls)

  Return only the class name, without package.

### getClassName

    public static String getClassName(String fullName)

  Return only the class name.

### getPackageName

    public static String getPackageName(Class cls)

  Return only the package, or empty string if none.

### getPackageName

    public static String getPackageName(String fullName)

  Return only the package, or empty string if none.

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.8 generated on January 11 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.