freemarker中的split字符串分割(十六)

1、简易说明

split分割:用来根据另外一个字符串的出现将原字符串分割成字符串序列

2、举例说明

 <#--freemarker中的split字符串分割-->
      <#list "张三三,李思思,,王强,柳树,诸葛正我"?split(",") as name>
          "${name}"
      </#list>

      <#list "AhuAjiuAjkdsfAoionAjiuiAnujkkdfAkoijAmcjdhfjdfaAdhnfjdhfA"?split("A") as num>
          "${num}"
      </#list>

3、示例结果

 <span style="white-space:pre">    </span> "张三三"
          "李思思"
          ""
          "王强"
          "柳树"
          "诸葛正我"

          ""
          "hu"
          "jiu"
          "jkdsf"
          "oion"
          "jiui"
          "nujkkdf"
          "koij"
          "mcjdhfjdfa"
          "dhnfjdhf"
          ""
上一篇:安卓ApiDemos最简单的使用方法


下一篇:uiautomator跑安卓端UI testing