模板:Str endswith/doc

萌娘百科,萬物皆可萌的百科全書!轉載請標註來源頁面的網頁連結,並聲明引自萌娘百科。內容不可商用。
前往: 導覽搜尋

本模板用於判斷字符串是否以某一子字符串結束。

用法

{{str endswith|字符串|子串}}
字符串 
必填。原字符串。
子串 
必填。用於判斷的子串。

範例

代碼 效果
{{str endswith|Example|le}} yes
{{str endswith|Example|LE}}
{{str endswith|Example|F}}
{{str endswith|Example|Example}} yes