public class StringTemplates extends Object
| 构造器和说明 |
|---|
StringTemplates() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
format(String template,
Object... args)
format based index
|
static String |
format(String template,
Pattern variablePattern,
Function2<String,Object[],String> valueGetter,
Object... args)
custom formatter
|
static String |
format(String template,
String variablePattern,
Function2<String,Object[],String> valueGetter,
Object... args)
custom formatter
|
static String |
formatWithoutIndex(String template,
Object... args)
format based order
|
public static String formatWithoutIndex(String template, Object... args)
template - the string templatepublic static String format(String template, Object... args)
template - the string templateargs - argspublic static String format(String template, String variablePattern, Function2<String,Object[],String> valueGetter, Object... args)
template - the string templatevariablePattern - variable pattern in templatevalueGetter - variable's value getter, will get value from argsargs - argspublic static String format(String template, Pattern variablePattern, Function2<String,Object[],String> valueGetter, Object... args)
template - the string templatevariablePattern - variable pattern in templatevalueGetter - variable's value getter, will get value from argsargs - argsCopyright © 2019. All rights reserved.