mirror of
https://github.com/gedoor/legado.git
synced 2024-07-06 23:47:49 +08:00
优化
This commit is contained in:
parent
cb94a48e94
commit
3498daa61b
@ -164,6 +164,13 @@ java.hexEncodeToString(utf8: String)
|
||||
java.randomUUID()
|
||||
java.androidId()
|
||||
```
|
||||
* 繁简转换
|
||||
```
|
||||
将文本转换为简体
|
||||
java.t2s(text: String): String
|
||||
将文本转换为繁体
|
||||
java.s2t(text: String): String
|
||||
```
|
||||
* 文件
|
||||
> 所有对于文件的读写删操作都是相对路径,只能操作阅读缓存/android/data/{package}/cache/内的文件
|
||||
```
|
||||
|
@ -6,6 +6,7 @@ import cn.hutool.core.codec.Base64
|
||||
import cn.hutool.core.util.HexUtil
|
||||
import com.github.junrar.Archive
|
||||
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.dateFormat
|
||||
import io.legado.app.constant.AppLog
|
||||
@ -449,6 +450,14 @@ interface JsExtensions : JsEncodeUtils {
|
||||
return HtmlFormatter.formatKeepImg(str)
|
||||
}
|
||||
|
||||
fun t2s(text: String): String {
|
||||
return ChineseUtils.t2s(text)
|
||||
}
|
||||
|
||||
fun s2t(text: String): String {
|
||||
return ChineseUtils.s2t(text)
|
||||
}
|
||||
|
||||
//****************文件操作******************//
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user