优化
This commit is contained in:
@@ -164,6 +164,13 @@ java.hexEncodeToString(utf8: String)
|
|||||||
java.randomUUID()
|
java.randomUUID()
|
||||||
java.androidId()
|
java.androidId()
|
||||||
```
|
```
|
||||||
|
* 繁简转换
|
||||||
|
```
|
||||||
|
将文本转换为简体
|
||||||
|
java.t2s(text: String): String
|
||||||
|
将文本转换为繁体
|
||||||
|
java.s2t(text: String): String
|
||||||
|
```
|
||||||
* 文件
|
* 文件
|
||||||
> 所有对于文件的读写删操作都是相对路径,只能操作阅读缓存/android/data/{package}/cache/内的文件
|
> 所有对于文件的读写删操作都是相对路径,只能操作阅读缓存/android/data/{package}/cache/内的文件
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import cn.hutool.core.codec.Base64
|
|||||||
import cn.hutool.core.util.HexUtil
|
import cn.hutool.core.util.HexUtil
|
||||||
import com.github.junrar.Archive
|
import com.github.junrar.Archive
|
||||||
import com.github.junrar.rarfile.FileHeader
|
import com.github.junrar.rarfile.FileHeader
|
||||||
|
import com.github.liuyueyi.quick.transfer.ChineseUtils
|
||||||
import io.legado.app.constant.AppConst
|
import io.legado.app.constant.AppConst
|
||||||
import io.legado.app.constant.AppConst.dateFormat
|
import io.legado.app.constant.AppConst.dateFormat
|
||||||
import io.legado.app.constant.AppLog
|
import io.legado.app.constant.AppLog
|
||||||
@@ -449,6 +450,14 @@ interface JsExtensions : JsEncodeUtils {
|
|||||||
return HtmlFormatter.formatKeepImg(str)
|
return HtmlFormatter.formatKeepImg(str)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun t2s(text: String): String {
|
||||||
|
return ChineseUtils.t2s(text)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun s2t(text: String): String {
|
||||||
|
return ChineseUtils.s2t(text)
|
||||||
|
}
|
||||||
|
|
||||||
//****************文件操作******************//
|
//****************文件操作******************//
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user