public class TextUtils extends Object
Constructor and Description |
---|
TextUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
formatCoordinate(double coordinate)
Useful to remove any trailing zeros and prevent a coordinate being over 7 significant figures.
|
static String |
formatCoordinate(double coordinate,
int precision)
Allows the specific adjusting of a coordinates precision.
|
static boolean |
isEmpty(CharSequence str)
Returns true if the string is null or 0-length.
|
static String |
join(CharSequence delimiter,
Object[] tokens)
Returns a string containing the tokens joined by delimiters.
|
public static boolean isEmpty(CharSequence str)
str
- the string to be examinedpublic static String join(CharSequence delimiter, Object[] tokens)
delimiter
- the delimeter on which to split.tokens
- An array objects to be joined. Strings will be formed from the objects by
calling object.toString().String
public static String formatCoordinate(double coordinate)
coordinate
- a double value representing a coordinate.public static String formatCoordinate(double coordinate, int precision)
coordinate
- a double value representing a coordinate.precision
- an integer value you'd like the precision to be at.© 2015–2016 Mapbox. All rights reserved.