fix: fix bili card share bug and improve bv parser
This commit is contained in:
6 files changed
+52
-18
No files matched your search
@@ -22,3 +22,12 @@ fun setTruncat(origin: String, g2d: Graphics2D, maxWidth: Int = 500): String {
|
||||
origin.substring(0, endIndex) + "..."
|
||||
} else origin
|
||||
}
|
||||
|
||||
fun Int.formatNumber(): String {
|
||||
return if (this >= 10000) {
|
||||
val result = this / 10000.0
|
||||
String.format("%.1f万", result)
|
||||
} else {
|
||||
this.toString()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user