public class LookupReplacer extends StrReplacer
Constructor and Description |
---|
LookupReplacer(String[]... lookup)
构造
|
Modifier and Type | Method and Description |
---|---|
protected int |
replace(CharSequence str,
int pos,
StringBuilder out)
抽象的字符串替换方法,通过传入原字符串和当前位置,执行替换逻辑,返回处理或替换的字符串长度部分。
|
apply
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
identity
public LookupReplacer(String[]... lookup)
lookup
- 被查找的键值对,每个String[]表示一个键值对protected int replace(CharSequence str, int pos, StringBuilder out)
StrReplacer
replace
in class StrReplacer
str
- 被处理的字符串pos
- 当前位置out
- 输出Copyright © 2025. All rights reserved.