类 StringUtils

java.lang.Object
com.zhipu.oapi.utils.StringUtils

public class StringUtils extends Object
  • 构造器详细资料

    • StringUtils

      public StringUtils()
  • 方法详细资料

    • isEmpty

      public static boolean isEmpty(String str)
    • isNotEmpty

      public static boolean isNotEmpty(String str)
    • formatString

      public static String formatString(String tpl, Map<String,String> params)
      参数:
      tpl - the template, use {Name} as placeholder, e.g.: "My name is {name}"
      params - the k-v pair. key should exist in tpl. with the template above, key can be "name"
      返回:
      String
    • formatString

      public static String formatString(String tpl, String placeHolderPrefix, String placeHolderSuffix, Map<String,String> params)
    • main

      public static void main(String[] args) throws Exception
      抛出:
      Exception