StringUtils (Apache CXF JavaDoc 3.0.4.redhat-621177 API)

org.apache.cxf.common.util

## Class StringUtils

- java.lang.Object
- - org.apache.cxf.common.util.StringUtils

-     public final class StringUtils
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Map<String,Pattern>` | `PATTERN_MAP`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `addDefaultPortIfMissing(String urlString)`
    `static String` | `addDefaultPortIfMissing(String urlString, String defaultPort)`
    `static String` | `capitalize(String name)` Return input string with first character in upper case.
    `static String` | `diff(String str1, String str2)`
    `static String` | `getFirstFound(String contents, String regex)`
    `static String` | `getFirstNotEmpty(List<String> list)`
    `static String` | `getFirstNotEmpty(String str, String separator)`
    `static List<String>` | `getFound(String contents, String regex)`
    `static List<String>` | `getParts(String str, String separator)`
    `static boolean` | `isEmpty(List<String> list)`
    `static boolean` | `isEmpty(String str)`
    `static boolean` | `isFileExist(String file)`
    `static String[]` | `split(String s, String regex)`
    `static String[]` | `split(String s, String regex, int limit)`
    `static byte[]` | `toBytes(String str, String enc)`
    `static byte[]` | `toBytesASCII(String str)`
    `static byte[]` | `toBytesUTF8(String str)`
    `static String` | `toHexString(byte[] bytes)`
    `static String` | `uncapitalize(String str)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### PATTERN_MAP

          public static final Map<String,Pattern> PATTERN_MAP

  - ### Method Detail

    - #### split

          public static String[] split(String s,
                       String regex)

    - #### split

          public static String[] split(String s,
                       String regex,
                       int limit)

    - #### isFileExist

          public static boolean isFileExist(String file)

    - #### isEmpty

          public static boolean isEmpty(String str)

    - #### isEmpty

          public static boolean isEmpty(List<String> list)

    - #### diff

          public static String diff(String str1,
                    String str2)

    - #### getParts

          public static List<String> getParts(String str,
                              String separator)

    - #### getFirstNotEmpty

          public static String getFirstNotEmpty(String str,
                                String separator)

    - #### getFirstNotEmpty

          public static String getFirstNotEmpty(List<String> list)

    - #### getFound

          public static List<String> getFound(String contents,
                              String regex)

    - #### getFirstFound

          public static String getFirstFound(String contents,
                             String regex)

    - #### addDefaultPortIfMissing

          public static String addDefaultPortIfMissing(String urlString)

    - #### addDefaultPortIfMissing

          public static String addDefaultPortIfMissing(String urlString,
                                       String defaultPort)

    - #### capitalize

          public static String capitalize(String name)

      Return input string with first character in upper case.
      Parameters:
        `name` - input string.
      Returns:
        capitalized form.

    - #### uncapitalize

          public static String uncapitalize(String str)

    - #### toBytesUTF8

          public static byte[] toBytesUTF8(String str)

    - #### toBytesASCII

          public static byte[] toBytesASCII(String str)

    - #### toBytes

          public static byte[] toBytes(String str,
                       String enc)

    - #### toHexString

          public static String toHexString(byte[] bytes)

Apache CXF