Package gaia.cu9.ari.gaiaorbit.util
Class TextUtils
- java.lang.Object
-
- gaia.cu9.ari.gaiaorbit.util.TextUtils
-
public class TextUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description TextUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
arrayToStr(java.lang.String[] arr)
static java.lang.String
capitalise(java.lang.String line)
Returns the given string with the first letter capitalisedstatic void
capLabelWidth(com.badlogic.gdx.scenes.scene2d.ui.Label l, float targetWidth)
static java.lang.String
capString(java.lang.String in, int targetLength)
static java.lang.String
capString(java.lang.String in, int targetLength, boolean fromStart)
static java.lang.String
concatenate(java.lang.String split, java.lang.String... strs)
Concatenates the strings using the given splitstatic java.lang.CharSequence
limitWidth(java.lang.CharSequence text, float width, float letterWidth)
static java.lang.String
propertyToMethodName(java.lang.String property)
Converts from property displayName to method displayName by removing the separator dots and capitalising each chunk.static java.lang.String
trueCapitalise(java.lang.String line)
Returns the given string with the first letter capitalised and all the others in lower case
-
-
-
Method Detail
-
capLabelWidth
public static void capLabelWidth(com.badlogic.gdx.scenes.scene2d.ui.Label l, float targetWidth)
-
limitWidth
public static java.lang.CharSequence limitWidth(java.lang.CharSequence text, float width, float letterWidth)
-
capString
public static java.lang.String capString(java.lang.String in, int targetLength)
-
capString
public static java.lang.String capString(java.lang.String in, int targetLength, boolean fromStart)
-
propertyToMethodName
public static java.lang.String propertyToMethodName(java.lang.String property)
Converts from property displayName to method displayName by removing the separator dots and capitalising each chunk. Example: model.texture.bump -> ModelTextureBump- Parameters:
property
- The property displayName- Returns:
- The method name
-
capitalise
public static java.lang.String capitalise(java.lang.String line)
Returns the given string with the first letter capitalised- Parameters:
line
- The input string- Returns:
- The string with its first letter capitalised
-
trueCapitalise
public static java.lang.String trueCapitalise(java.lang.String line)
Returns the given string with the first letter capitalised and all the others in lower case- Parameters:
line
- The input string- Returns:
- The string with its first letter capitalised and the others in lower case
-
concatenate
public static java.lang.String concatenate(java.lang.String split, java.lang.String... strs)
Concatenates the strings using the given split- Parameters:
split
- The splitstrs
- The strings- Returns:
- The concatenation
-
arrayToStr
public static java.lang.String arrayToStr(java.lang.String[] arr)
-
-