Top Description Constructors Methods
org.eclipse.xtext.xbase.lib

public Class StringExtensions

extends Object
Class Inheritance
Annotations
@GwtCompatible
Imports
com.google.common.annotations.GwtCompatible

This is an extension library for strings.
Author
Sven Efftinge - Initial contribution and API

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static boolean

Returns:

true if s is null or equal to the empty String ""
isNullOrEmpty
(String
the string
s
)

Returns true if s is null or equal to the empty String "".

public static String

Returns:

a + b
operator_plus
(String
a string.
a
,
Object
an object.
b
)

The binary + operator that concatenates a string and the string reprentation of an object.

public static String

Returns:

a + b
operator_plus
(String
a string.
a
,
String
another string.
b
)

The binary + operator that concatenates two strings.

public static String

Returns:

the String s with an lower case first character or null if the input String s was null.
toFirstLower
(String
the string that should get an lower case first character. May be null.
s
)

Returns the String s with an lower case first character.

public static String

Returns:

the String s with an upper case first character or null if the input String s was null.
toFirstUpper
(String
the string that should get an upper case first character. May be null.
s
)

Returns the String s with an upper case first character.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

StringExtensionsback to summary
public StringExtensions()

Method Detail

isNullOrEmptyback to summary
public static boolean isNullOrEmpty(String s)

Returns true if s is null or equal to the empty String "".

Parameters
s:String

the string

Returns:boolean

true if s is null or equal to the empty String ""

Annotations
@Pure
operator_plusback to summary
public static String operator_plus(String a, Object b)

The binary + operator that concatenates a string and the string reprentation of an object.

Parameters
a:String

a string.

b:Object

an object.

Returns:String

a + b

Annotations
@Pure
@Inline:($1 + $2)
constantExpression:true
operator_plusback to summary
public static String operator_plus(String a, String b)

The binary + operator that concatenates two strings.

Parameters
a:String

a string.

b:String

another string.

Returns:String

a + b

Annotations
@Pure
@Inline:($1 + $2)
constantExpression:true
Since
2.5
toFirstLowerback to summary
public static String toFirstLower(String s)

Returns the String s with an lower case first character. This function is null-safe.

Parameters
s:String

the string that should get an lower case first character. May be null.

Returns:String

the String s with an lower case first character or null if the input String s was null.

Annotations
@Pure
toFirstUpperback to summary
public static String toFirstUpper(String s)

Returns the String s with an upper case first character. This function is null-safe.

Parameters
s:String

the string that should get an upper case first character. May be null.

Returns:String

the String s with an upper case first character or null if the input String s was null.

Annotations
@Pure