xldutils-kotlin/src/main/java/cn/sinata/xldutils/utils/StringKt.kt
@@ -42,14 +42,24 @@ * urlEncode */ fun String?.urlEncode(): String { return if (isNullOrEmpty()) "" else URLEncoder.encode(this, "utf-8") return if (isNullOrEmpty()) "" else try { URLEncoder.encode(this, "utf-8") }catch (e: Exception){ e.printStackTrace() this } } /** * urlDecode */ fun String?.urlDecode(): String { return if (isNullOrEmpty()) "" else URLDecoder.decode(this, "utf-8") return if (isNullOrEmpty()) "" else try { URLDecoder.decode(this, "utf-8") }catch (e: Exception){ e.printStackTrace() this } } /**