toReplaceRule

@JvmStatic
@JvmOverloads
fun toReplaceRule(replaceString: String, isRegex: Boolean = false, matchIndex: Int? = null, matchRange: IntRange? = null, newString: CharSequence? = null, replacementMatch: OnSpanReplacementMatch? = null): ReplaceRule

兼容Java适配 @see toReplaceRule

Parameters

replaceString

查找的字符串或正则文本

isRegex

replaceString是否为正则

matchIndex

单一匹配位置 (matchRange不为null时优先使用matchRange)

matchRange

匹配范围

newString

替换文本(null 为不替换)

replacementMatch

匹配时回调