1,819
个编辑
更改
创建页面,内容为“<includeonly>{{#if:{{{1|}}}|<!--if param. 1 not empty-- --then extract substring-->{{Str sub long|nocategory={{{nocategory|}}}|{{{1}}}|{{max|0|{{#expr:{{Str len|noca...”
<includeonly>{{#if:{{{1|}}}|<!--if param. 1 not empty--
--then extract substring-->{{Str sub long|nocategory={{{nocategory|}}}|{{{1}}}|{{max|0|{{#expr:{{Str len|nocategory={{{nocategory|}}}|{{{1}}}}}-{{{2}}}}}}}|{{{2}}}}}<!--
--else-->|<!--empty, so...
--skip complex processing & return {3}-->{{{3|}}}<!--
-->}}<!--endif param. 1 not empty--></includeonly><noinclude>
{{引自其他wiki|英文維基百科|[[enwiki:Template:Str_rightc]]}}
{{distinguish|Template:Str_right}}
返回右起的n个字符。
例子:
* <code><nowiki>{{str rightc|这是一个不是很长的示例句子|7}}</nowiki></code> → {{str rightc|这是一个不是很长的示例句子|7}}
* <code><nowiki>{{str rightc|这是一个不是很长的示例句子|1}}</nowiki></code> → {{str rightc|这是一个不是很长的示例句子|1}}
* <code><nowiki>{{str rightc|这是一个不是很长的示例句子|0}}</nowiki></code> → {{str rightc|这是一个不是很长的示例句子|0}}
* <code><nowiki>{{str rightc|这是一个不是很长的示例句子|99}}</nowiki></code> → {{str rightc|这是一个不是很长的示例句子|99}}
[[分类:辅助模板]]
</noinclude>
--then extract substring-->{{Str sub long|nocategory={{{nocategory|}}}|{{{1}}}|{{max|0|{{#expr:{{Str len|nocategory={{{nocategory|}}}|{{{1}}}}}-{{{2}}}}}}}|{{{2}}}}}<!--
--else-->|<!--empty, so...
--skip complex processing & return {3}-->{{{3|}}}<!--
-->}}<!--endif param. 1 not empty--></includeonly><noinclude>
{{引自其他wiki|英文維基百科|[[enwiki:Template:Str_rightc]]}}
{{distinguish|Template:Str_right}}
返回右起的n个字符。
例子:
* <code><nowiki>{{str rightc|这是一个不是很长的示例句子|7}}</nowiki></code> → {{str rightc|这是一个不是很长的示例句子|7}}
* <code><nowiki>{{str rightc|这是一个不是很长的示例句子|1}}</nowiki></code> → {{str rightc|这是一个不是很长的示例句子|1}}
* <code><nowiki>{{str rightc|这是一个不是很长的示例句子|0}}</nowiki></code> → {{str rightc|这是一个不是很长的示例句子|0}}
* <code><nowiki>{{str rightc|这是一个不是很长的示例句子|99}}</nowiki></code> → {{str rightc|这是一个不是很长的示例句子|99}}
[[分类:辅助模板]]
</noinclude>