mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-24 23:20:09 +08:00
Add JvmSynthetic
This commit is contained in:
parent
d3ccb56658
commit
7adacdbc6a
@ -8,6 +8,7 @@ import kotlinx.io.core.ByteReadPacket
|
|||||||
import kotlinx.io.core.String
|
import kotlinx.io.core.String
|
||||||
import kotlinx.io.core.use
|
import kotlinx.io.core.use
|
||||||
import kotlin.jvm.JvmOverloads
|
import kotlin.jvm.JvmOverloads
|
||||||
|
import kotlin.jvm.JvmSynthetic
|
||||||
|
|
||||||
@JvmOverloads
|
@JvmOverloads
|
||||||
fun ByteArray.toHexString(separator: String = " "): String = this.joinToString(separator) {
|
fun ByteArray.toHexString(separator: String = " "): String = this.joinToString(separator) {
|
||||||
@ -21,9 +22,9 @@ fun ByteArray.toHexString(separator: String = " "): String = this.joinToString(s
|
|||||||
@JvmOverloads
|
@JvmOverloads
|
||||||
fun ByteArray.toUHexString(separator: String = " "): String = this.toUByteArray().toUHexString(separator)
|
fun ByteArray.toUHexString(separator: String = " "): String = this.toUByteArray().toUHexString(separator)
|
||||||
|
|
||||||
fun ByteArray.stringOfWitch(charset: Charset = Charsets.UTF_8): String = String(this, charset = charset)
|
fun ByteArray.encodeToString(charset: Charset = Charsets.UTF_8): String = String(this, charset = charset)
|
||||||
|
|
||||||
//@JvmSynthetic TODO 等待 kotlin 修复 bug 后添加这个注解
|
@JvmSynthetic
|
||||||
@JvmOverloads
|
@JvmOverloads
|
||||||
fun UByteArray.toUHexString(separator: String = " "): String = this.joinToString(separator) {
|
fun UByteArray.toUHexString(separator: String = " "): String = this.joinToString(separator) {
|
||||||
var ret = it.toString(16).toUpperCase()
|
var ret = it.toString(16).toUpperCase()
|
||||||
|
Loading…
Reference in New Issue
Block a user