模板:Str endswith:修订间差异

    来自中国珂学院
    Cquote>Xeror
    (新模板)
     
    小 (导入1个版本)
     
    (未显示7个用户的17个中间版本)
    第1行: 第1行:
    {{#ifeq: {{str left |nocategory={{{nocategory|}}} |{{{1|}}}|{{#expr:{{str len |nocategory={{{nocategory|}}} |{{{1|}}}}}-{{str len |nocategory={{{nocategory|}}} |{{{2|}}}}}}}}}{{trim |nocategory={{{nocategory|}}} |{{{2|}}}}} | {{trim |nocategory={{{nocategory|}}} |{{{1|}}}}}
    <includeonly>{{#ifeq:{{#Invoke:String|sub|s={{{1|}}}| -{{#invoke:String|len|s={{{2}}}}} |ignore_errors=true}}|{{{2|}}}|是}}</includeonly><noinclude>
      | 是
    {{documentation}}
    }}<noinclude>
    這是{{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}}
     
    === 參見 ===
    {{字符串模板參見文字}}
     
    <includeonly>
    <!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
     
    [[bs:Šablon:Niz završavasa]]
    [[en;Template:Str endswith}}
    [[id:Templat:Str endswith]]
     
    </noinclude>
    </noinclude>

    2020年3月1日 (日) 18:26的最新版本

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