feat: support gif reverse and fix get image bug
This commit is contained in:
6 files changed
+89
-5
No files matched your search
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright © 2024 RTAkland
|
||||
* Author: RTAkland
|
||||
* Date: 2024/9/8
|
||||
*/
|
||||
|
||||
|
||||
package cn.rtast.fancybot.util.str
|
||||
|
||||
import java.util.*
|
||||
|
||||
fun String.encodeToBase64(): String {
|
||||
return Base64.getEncoder().encodeToString(this.toByteArray())
|
||||
}
|
||||
|
||||
fun ByteArray.encodeToBase64(): String {
|
||||
return Base64.getEncoder().encodeToString(this)
|
||||
}
|
||||
|
||||
fun String.decodeToString(): String {
|
||||
return String(Base64.getDecoder().decode(this))
|
||||
}
|
||||
Reference in New Issue
Block a user