WordCount

@Serializable
data class WordCount(val count: Int, val unit: String?, @StringRes val unitResId: Int?)

用于存储书本字数的对象 可以灵活更变其单位 如果unit与unitResId都是null 那么会默认使用 字 作为单位

Since

Api 2

Parameters

count

实际的大小

unit

单位名称, 其中字符串的{count}部分将被替换为数字, 如果不存在{count}占位符则会直接将单位加到数字后面

unitResId

单位名称的ResId, 其中字符串的{count}部分将被替换为数字, 如果不存在{count}占位符则会直接将单位加到数字后面

Constructors

Link copied to clipboard
constructor(count: Int, unit: String?, @StringRes unitResId: Int?)
constructor(count: Int)
constructor(count: Int, unit: String)
constructor(count: Int, @StringRes unitResId: Int)

Properties

Link copied to clipboard
val count: Int
Link copied to clipboard
val unit: String?
Link copied to clipboard