类 StringUtility


  • public class StringUtility
    extends Object
    作者:
    Yun
    • 方法详细资料

      • 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!"
      • hashCodeByHexString

        public String hashCodeByHexString​(String s)
        Get hash code for provided string, then covert the hash code to hexadecimal String