org.eclipse.emf.facet.util.core.internal.exported
Class StringUtils

java.lang.Object
  extended by org.eclipse.emf.facet.util.core.internal.exported.StringUtils

public final class StringUtils
extends java.lang.Object

Since:
0.2
Author:
Gabriel Barbier

Field Summary
static java.lang.String ELLIPSIS
           
 
Method Summary
static java.lang.String firstLetterToLowerCase(java.lang.String source)
           
static java.lang.String firstLetterToUpperCase(java.lang.String source)
           
static java.lang.String inferJavaClassName(java.lang.String name)
          Get a name suitable for a Java class from the given name.
static java.lang.String truncateBeforeNewline(java.lang.String str)
          Truncate the given String before the first newline or a maximum number of characters, whichever comes first.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ELLIPSIS

public static final java.lang.String ELLIPSIS
Method Detail

firstLetterToLowerCase

public static java.lang.String firstLetterToLowerCase(java.lang.String source)

firstLetterToUpperCase

public static java.lang.String firstLetterToUpperCase(java.lang.String source)

truncateBeforeNewline

public static java.lang.String truncateBeforeNewline(java.lang.String str)
Truncate the given String before the first newline or a maximum number of characters, whichever comes first. Adds an ellipsis ("...") if it was effectively truncated.

Parameters:
str - the string to truncate
Returns:
the part of the given string before the first newline

inferJavaClassName

public static java.lang.String inferJavaClassName(java.lang.String name)
Get a name suitable for a Java class from the given name. Capitalizes the first letter and each letter after a space, and removes spaces.