kutils / com.celites.kutils / kotlin.String

Extensions for kotlin.String

addToCommaSeparatedString

fun String.addToCommaSeparatedString(stringToAdd: String, allowDuplicates: Boolean = false): String

containsInArray

fun String?.containsInArray(vararg names: String, ignoreCase: Boolean = true): Boolean

convertDateFormat

fun String.convertDateFormat(fromFormat: String, toFormat: String): String

extension

val String.extension: String

Gets extension from filePath

failSafeSplit

fun String.failSafeSplit(delimeter: String = ","): List<String>?

isDateStringProperlyFormatted

fun String.isDateStringProperlyFormatted(dateFormat: String): Boolean

isLocal

fun String.isLocal(): Boolean

toDate

infix fun String.toDate(currentFormat: String): Date

useIfEmpty

infix fun String?.useIfEmpty(otherString: String?): String