code: public static String trim(String str, String arg) {
          if (str == null || arg == null) {
              throw new NullPointerException("str or arg must not be null");
          }
  
          while (str.startsWith(arg)) {
              str = str.substring(arg.length());
          }
  
          while (str.endsWith(arg)) {
              str = str.substring(0, str.length() - arg.length());
          }
          return str;
      }
docs: 删除字符串的前/后缀
  
  @param str 字符串
  @param arg 要删除的前/后缀
  @return 删除后的结果，例如当str是001234000、arg是0时，结果为1234