Package org.eclipse.xtext.xbase.lib
Class StringExtensions
- java.lang.Object
-
- org.eclipse.xtext.xbase.lib.StringExtensions
-
@GwtCompatible public class StringExtensions extends java.lang.ObjectThis is an extension library forstrings.
-
-
Constructor Summary
Constructors Constructor Description StringExtensions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisNullOrEmpty(java.lang.String s)Returnstrueifsisnullor equal to the emptyString"".static java.lang.Stringoperator_plus(java.lang.String a, java.lang.Object b)The binary+operator that concatenates a string and the string reprentation of an object.static java.lang.Stringoperator_plus(java.lang.String a, java.lang.String b)The binary+operator that concatenates two strings.static java.lang.StringtoFirstLower(java.lang.String s)Returns theStringswith anlower casefirst character.static java.lang.StringtoFirstUpper(java.lang.String s)Returns theStringswith anupper casefirst character.
-
-
-
Method Detail
-
operator_plus
@Pure public static java.lang.String operator_plus(java.lang.String a, java.lang.Object b)
The binary+operator that concatenates a string and the string reprentation of an object.- Parameters:
a- a string.b- an object.- Returns:
a + b
-
operator_plus
@Pure public static java.lang.String operator_plus(java.lang.String a, java.lang.String b)
The binary+operator that concatenates two strings.- Parameters:
a- a string.b- another string.- Returns:
a + b- Since:
- 2.5
-
isNullOrEmpty
@Pure public static boolean isNullOrEmpty(java.lang.String s)
Returnstrueifsisnullor equal to the emptyString"".- Parameters:
s- the string- Returns:
trueifsisnullor equal to the emptyString""
-
toFirstUpper
@Pure public static java.lang.String toFirstUpper(java.lang.String s)
Returns theStringswith anupper casefirst character. This function is null-safe.- Parameters:
s- the string that should get an upper case first character. May benull.- Returns:
- the
Stringswith an upper case first character ornullif the inputStringswasnull.
-
toFirstLower
@Pure public static java.lang.String toFirstLower(java.lang.String s)
Returns theStringswith anlower casefirst character. This function is null-safe.- Parameters:
s- the string that should get an lower case first character. May benull.- Returns:
- the
Stringswith an lower case first character ornullif the inputStringswasnull.
-
-