(1)常用的方法 String str = "abCDEfghi"; boolean blank = StrUtil.isBlank(str); boolean notBlank = StrUtil.isNotBlank(str); String removeSuffix = StrUtil.removeSuffix("test.txt", ".txt"); String removePrefixIgnoreCase = StrUtil.removePrefixIgnoreCase(str, "A"); String sub = StrUtil.sub(str, 2, 4); String sub1 = StrUtil.sub(str, 2, -3); String template = "{}爱{}!{}"; String fin = StrUtil.format(template, "我", "JAVA","哈"); (2)hasBlank、hasEmpty方法 就是给定一些字符串,如果一旦有空的就返回true,常用于判断好多字段是否有空的(例如web表单数据)。...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with CharSequence
Contact CharSequence, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack