Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有StringUtils.replaceEach()返回 aStringBuilder或StringBuffer而不是Apache 的版本String?我想避免复制代码。如果没有,还有其他图书馆吗?
StringUtils.replaceEach()
StringBuilder
StringBuffer
String
所有StringUtils的方法都返回Strings。但是,您可以始终执行以下操作:
StringUtils
StringBuilder builder = new StringBuilder(StringUtils.replaceEach(myString, searchList, replaceList));