类 StringUtility
- java.lang.Object
-
- tech.testnx.cah.common.utils.StringUtility
-
public class StringUtility extends Object
- 作者:
- Yun
-
-
字段概要
字段 修饰符和类型 字段 说明 static StringUtilityINSTANCE
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 StringhashCodeByHexString(String s)Get hash code for provided string, then covert the hash code to hexadecimal StringStringrender(String template, Map<String,String> marker)Light template render
Replace all mark with ${{name}} in template with value defined in marker map
Eg: Template: "Hello: ${{who}}, this is ${{how}} day!"
Marker: marker.put("who", "Lee"); marker.put("how", "nice");
Output: "Hello: Lee, this is nice day!"Stringrender(Path templatePath, Map<String,String> marker)
-
-
-
字段详细资料
-
INSTANCE
public static final StringUtility INSTANCE
-
-
方法详细资料
-
render
public String render(String template, Map<String,String> marker)
Light template render
Replace all mark with ${{name}} in template with value defined in marker map
Eg: Template: "Hello: ${{who}}, this is ${{how}} day!"
Marker: marker.put("who", "Lee"); marker.put("how", "nice");
Output: "Hello: Lee, this is nice day!"
-
-