模板:Str endswith:修订间差异

    来自中国珂学院
    Cquote>Tomchen1989
    小无编辑摘要
    Cquote>Tomchen1989
    (移至文档)
    第1行: 第1行:
    <includeonly>{{#ifeq:{{#Invoke:String|sub|s={{{1|}}}| -{{#invoke:String|len|s={{{2}}}}} |ignore_errors=true}}|{{{2|}}}|是}}</includeonly><noinclude>
    <includeonly>{{#ifeq:{{#Invoke:String|sub|s={{{1|}}}| -{{#invoke:String|len|s={{{2}}}}} |ignore_errors=true}}|{{{2|}}}|是}}</includeonly><noinclude>
    {{translating|[[:en:Template:Str endswith]]|time=2012-03-23}}
    {{documentation}}
    這是{{tl|str endswith}}模板。
     
    如果第二個參數是第一個參數的結尾,它會傳回「是」。由於它用到{{tl|str left}}和{{tl|str len}},所以會受到它們的限制。兩個參數在使用前都會被裁切。
     
    === 例子 ===
    * {{tlx|str endswith|foo (bar)|(bar)}} → {{str endswith|foo (bar)|(bar)}}
    * {{tlx|str endswith|foo|bar}} → {{str endswith|foo|bar}}
    * {{tlx|str endswith|(bar)|foo (bar)}} → {{str endswith|(bar)|foo (bar)}}
    * {{tlx|str endswith|foo bar&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;bar}} → {{str endswith|foo bar  |  bar}}
     
    ; 特殊情況
    * {{tlx|str endswith}} → {{str endswith}}
    * {{tlx|str endswith|<i/>|<i/>}} → {{str endswith||}}
    * {{tlx|str endswith|<i/>|&#32;}} → {{str endswith|| }}
    * {{tlx|str endswith|&#32;|<i/>}} → {{str endswith| |}}
    * {{tlx|str endswith|''[499 characters]''X|X}} → {{str endswith|123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345678 X|X}}
    * {{tlx|str endswith|''[499 characters]''X|Y}} → {{str endswith|123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345678 X|Y}}
    * {{tlx|str endswith|''[499 characters]''X|''[same 499 characters]''X}} → {{str endswith|123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345678 X|123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345678 X}}
    * {{tlx|str endswith|''[499 characters]''X|''[same 499 characters]''Y}} → {{str endswith|123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345678 X|123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345678 Y}}
    * {{tlx|str endswith|''[500 characters]''X|X}} → {{str endswith|123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 X|X}} {{n}}
    * {{tlx|str endswith|''[500 characters]''X|Y}} → {{str endswith|123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 X|Y}}
     
    === 參見 ===
    {{字符串模板參見文字}}
     
    <!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
    </noinclude>
    </noinclude>

    2013年8月8日 (四) 00:46的版本

    文档图示 模板文档[创建]