Package com.xero.api
Class StringUtil
java.lang.Object
com.xero.api.StringUtil
public class StringUtil extends Object
-
Constructor Summary
Constructors Constructor Description StringUtil() -
Method Summary
Modifier and Type Method Description static booleancontainsIgnoreCase(String[] array, String value)Check if the given array contains the given value (with case-insensitive comparison).org.threeten.bp.LocalDateconvertStringToDate(String date)org.threeten.bp.LocalDateTimeconvertStringToLocalDateTime(String date)org.threeten.bp.OffsetDateTimeconvertStringToOffsetDateTime(String date)static Stringjoin(String[] array, String separator)Join an array of strings with the given separator.
-
Constructor Details
-
StringUtil
public StringUtil()
-
-
Method Details
-
containsIgnoreCase
Check if the given array contains the given value (with case-insensitive comparison).- Parameters:
array- The arrayvalue- The value to search- Returns:
- true if the array contains the value
-
join
Join an array of strings with the given separator.Note: This might be replaced by utility method from commons-lang or guava someday if one of those libraries is added as dependency.
- Parameters:
array- The array of stringsseparator- The separator- Returns:
- the resulting string
-
convertStringToDate
- Throws:
IOException
-
convertStringToOffsetDateTime
public org.threeten.bp.OffsetDateTime convertStringToOffsetDateTime(String date) throws IOException- Throws:
IOException
-
convertStringToLocalDateTime
- Throws:
IOException
-