RichUtils / pyxis.uzuki.live.richutilskt.utils / kotlin.String

Extensions for kotlin.String

createJSONArray

fun String.createJSONArray(): JSONArray?

create JSONArray from String

createJSONObject

fun String.createJSONObject(): JSONObject?

create JSONObject from String

getBitmap

fun String.getBitmap(): Bitmap?

get bitmap from filePath

parseDate

fun String.parseDate(format: String? = "yyyy-MM-dd HH:mm:ss"): Date?

parsing date from String

toDateString

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

format formatted date to another formatted date

toFile

fun String.toFile(): File

make String to File