<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    不做浮躁的人
    正在行走的人...
    posts - 171,  comments - 51,  trackbacks - 0

    一:字符串內(nèi)置方法
    ??????substring(from, toExclusive)
    ??
    ???cap_first

    ???uncap_first

    ???capitalize

    ???chop_linebreak

    ???date, time, datetime:
    ???<#assign test1 = "10/25/1995"?date("MM/dd/yyyy")>
    ???<#assign test2 = "15:05:30"?time("HH:mm:ss")>
    ???<#assign test3 = "1995-10-25 03:05 PM"?datetime("yyyy-MM-dd hh:mm a")>

    ???ends_with

    ???html
    ???< replaced with &lt;?
    ???> replaced with &gt;?
    ???& replaced with &amp;?
    ???" replaced with &quot;?

    ???groups用于matches的結(jié)果。

    ???index_of

    ???j_string

    ???js_string

    ???last_index_of

    ???length

    ???lower_case

    ???left_pad

    ???right_pad

    ???contains

    ???matchs
    ???返回boolean或者sequence。
    ???<#if "fxo"?matches("f.?o")>Matches.<#else>Does not match.</#if>
    ???<#assign res = "foo bar fyo"?matches("f.?o")>
    ???<#if res>Matches.<#else>Does not match.</#if>
    ???Matching sub-strings:
    ???<#list res as m>
    ???- ${m}
    ???</#list>
    ???res就是典型的多值類(lèi)型。

    ???如果正則表達(dá)式包含組(圓括號(hào)),可以通過(guò)groups訪問(wèn)。
    ???<#assign res = "aa/rx; ab/r;"?matches("(\\w[^/]+)/([^;]+);")>
    ???<#list res as m>
    ???- ${m} is ${m?groups[1]} per ${m?groups[2]}
    ???</#list>?

    ???number

    ???replace

    ???rtf
    ???\ replaced with \\
    ???{ replaced with \{
    ???} replaced with \}


    ???url
    ???將所有url的保留字符進(jìn)行轉(zhuǎn)碼。
    ???url_escaping_charset
    ?
    ? split?

    ? starts_with

    ???trim,upper_case。word_list,xml

    ???字符串內(nèi)置方法可以接受的通用標(biāo)記:
    ???i: 大小寫(xiě)不敏感。
    ?f: 只用于第一個(gè),常用于替換,查找等,取第一次出現(xiàn)
    ?r: 子串是個(gè)正則表達(dá)式。
    ?m: 正則表達(dá)式的多行模式。
    ???s: 單行模式。
    ?c:?允許空白或注釋在正則表達(dá)式中。
    <#assign s = 'foo bAr baar'>
    ${s?replace('ba', 'XY')}
    i: ${s?replace('ba', 'XY', 'i')}
    if: ${s?replace('ba', 'XY', 'if')}
    r: ${s?replace('ba*', 'XY', 'r')}
    ri: ${s?replace('ba*', 'XY', 'ri')}
    rif: ${s?replace('ba*', 'XY', 'rif')}


    Built-in

    i

    r

    m

    s

    c

    f

    replace

    Yes

    Yes

    Only with r

    Only with r

    Only with r

    Yes

    split

    Yes

    Yes

    Only with r

    Only with r

    Only with r

    No

    match

    Yes

    No

    Yes

    Yes

    Yes

    No

    posted on 2007-03-25 21:38 不做浮躁的人 閱讀(1468) 評(píng)論(0)  編輯  收藏 所屬分類(lèi): freemarker

    <2007年3月>
    25262728123
    45678910
    11121314151617
    18192021222324
    25262728293031
    1234567

    常用鏈接

    留言簿(9)

    隨筆分類(lèi)(31)

    隨筆檔案(75)

    文章分類(lèi)(1)

    文章檔案(3)

    搜索

    •  

    最新評(píng)論

    閱讀排行榜

    評(píng)論排行榜

    主站蜘蛛池模板: 亚洲国产成人无码AV在线| 精品国产污污免费网站入口在线| 国产国产人免费人成免费视频| 日本中文字幕免费看| 久久久国产精品亚洲一区| 国产三级在线观看免费| jizz日本免费| 亚洲伊人久久大香线焦| 亚洲AV无码乱码精品国产| 日韩av无码久久精品免费| 亚洲经典千人经典日产| 亚洲av永久无码精品古装片| 成人无码区免费A片视频WWW| fc2免费人成为视频| 亚洲五月综合缴情婷婷| 中文字幕亚洲一区二区三区| 最近2019中文字幕免费看最新| 丁香花在线观看免费观看图片 | 亚洲免费黄色网址| 美女无遮挡免费视频网站| 自怕偷自怕亚洲精品| 亚洲一区二区三区在线视频 | a级亚洲片精品久久久久久久| 亚洲毛片在线免费观看| 一区二区三区免费精品视频 | 美女扒开尿口给男人爽免费视频| 亚洲精品第一国产综合精品| 亚洲婷婷国产精品电影人久久| 男人的好免费观看在线视频| 日韩av无码久久精品免费| 一级毛片免费视频网站| 亚洲精品成a人在线观看☆| 亚洲色图黄色小说| 亚洲情综合五月天| 免费va人成视频网站全| 国产成人A在线观看视频免费| 久草免费福利资源站| 精品国产呦系列在线观看免费| 色偷偷亚洲第一综合网| 亚洲综合色婷婷在线观看| 91在线亚洲精品专区|