Package org.eclipse.e4.ui.css.core.utils

# Class StringUtils

java.lang.Object
org.eclipse.e4.ui.css.core.utils.StringUtils

public class StringUtils extends Object
Helper for String.

## Constructor Summary

Constructors
Constructor
Description
`StringUtils()`

## Method Summary

Modifier and Type
Method
Description
`static String`
`capitalize(String str)`
Capitalizes all the whitespace separated words in a String.
`static String`
`capitalize(String str, char[] delimiters)`
Capitalizes all the delimiter separated words in a String.
`static boolean`
`isEmpty(String value)`
Return true if String value is null or empty.
`static final String`
`replace(String line, String oldString, String newString)`
Replace oldString occurrences with newString occurrences of the String line and return the result.

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

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

## Constructor Details

### StringUtils

public StringUtils()

## Method Details

### replace

public static final String replace(String line, String oldString, String newString)
Replace oldString occurrences with newString occurrences of the String line and return the result.

### isEmpty

public static boolean isEmpty(String value)
Return true if String value is null or empty.

### capitalize

public static String capitalize(String str)

Capitalizes all the whitespace separated words in a String. Only the first letter of each word is changed.

Whitespace is defined by `Character.isWhitespace(char)`. A `null` input String returns `null`. Capitalization uses the unicode title case, normally equivalent to upper case.

     WordUtils.capitalize(null)        = null
     WordUtils.capitalize("")          = ""
     WordUtils.capitalize("i am FINE") = "I Am FINE"

Parameters:
  `str` - the String to capitalize, may be null
Returns:
  capitalized String, `null` if null String input

### capitalize

public static String capitalize(String str, char[] delimiters)

Capitalizes all the delimiter separated words in a String. Only the first letter of each word is changed.

The delimiters represent a set of characters understood to separate words. The first string character and the first non-delimiter character after a delimiter will be capitalized.

A `null` input String returns `null`. Capitalization uses the unicode title case, normally equivalent to upper case.

     WordUtils.capitalize(null, *)            = null
     WordUtils.capitalize("", *)              = ""
     WordUtils.capitalize(*, new char[0])     = *
     WordUtils.capitalize("i am fine", null)  = "I Am Fine"
     WordUtils.capitalize("i aM.fine", {'.'}) = "I aM.Fine"

Parameters:
  `str` - the String to capitalize, may be null
  `delimiters` - set of characters to determine capitalization, null means whitespace
Returns:
  capitalized String, `null` if null String input
Since:
  2.1