public class TemplateUtil extends Object
| 构造器和说明 |
|---|
TemplateUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Set<String> |
matchIn(Collection<String> templates,
String content)
查找内容匹配的模版字符串,适合字符不怎么重复的场景。
|
static Set<String> |
matchIn(Collection<String> templates,
String content,
String separator)
查找内容匹配的模版字符串,适合字符不怎么重复的场景。
|
static boolean |
matchIn(String template,
String content)
验证内容是否匹配模版,分隔符为"{{}}",适合字符不怎么重复的场景。
|
static boolean |
matchIn(String template,
String content,
String separator)
验证内容是否匹配模版,分隔符为"{{}}",适合字符不怎么重复的场景。
|
static TemplateResult |
matchIn(TemplateInfo templateInfo,
String content)
调用模版对象的匹配方法,并返回结果。
|
public static TemplateResult matchIn(TemplateInfo templateInfo, String content)
templateInfo - 模版对象content - 待匹配内容public static Set<String> matchIn(Collection<String> templates, String content)
templates - 模版字符串集合content - 待匹配内容public static Set<String> matchIn(Collection<String> templates, String content, String separator)
templates - 模版字符串集合content - 待匹配内容separator - 模版分隔符public static boolean matchIn(String template, String content)
template - 模版字符串 例:您的验证码是{{}}content - 待匹配内容 例:您的验证码是1234Copyright © 2022. All rights reserved.