public abstract class StrReplacer extends Object implements Replacer<CharSequence>, Serializable
Constructor and Description |
---|
StrReplacer() |
Modifier and Type | Method and Description |
---|---|
CharSequence |
replace(CharSequence t)
替换指定类型为目标类型
|
protected abstract int |
replace(CharSequence str,
int pos,
StrBuilder out)
抽象的字符串替换方法,通过传入原字符串和当前位置,执行替换逻辑,返回处理或替换的字符串长度部分。
|
protected abstract int replace(CharSequence str, int pos, StrBuilder out)
str
- 被处理的字符串pos
- 当前位置out
- 输出public CharSequence replace(CharSequence t)
Replacer
replace
in interface Replacer<CharSequence>
t
- 被替换的对象Copyright © 2024. All rights reserved.