打开/关闭菜单
1681
2.2万
6525
11.7万
舰R百科
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

舰R百科是靠无数志愿编辑者持续地建设更新完善的。编辑非常简单,无需代码知识,请勇于更新页面!
编辑入门 | 资助百科 | 留言讨论页 | 微博@舰R百科 | 百科编辑讨论Q群:366818861

模板:Str rightc/doc

舰R百科,玩家自由编辑的战舰少女R百科
Imfrankliu留言 | 贡献2016年6月15日 (三) 10:44的版本 (创建页面,内容为“{{Documentation subpage}} <!----PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE----> == Usage == : {{tlx|str rightc|<string>|<count>}} : {{tlx|str...”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

模板:Documentation subpage

Usage

模板:Tlx
模板:Tlx

Gives a substring of length <count> characters from the right-side end of the string, or, if provided, returns <result if empty> when string is empty.

Examples

  • {{str rightc |Lorem ipsum dolor sit amet |10}}
  • {{str rightc |Lorem ipsum dolor sit amet |1}}
  • {{str rightc |Lorem ipsum dolor sit amet |0}}
  • {{str rightc | |1 |string is empty}}
  • {{str rightc |123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.1 |99}}

TemplateData

模板:TemplateDataHeader <templatedata> {

       "description": "Gives the right most <count> characters of a string.",
       "params": {
               "1": {
                       "label": "String",
                       "description": "The string to be trimmed",
                       "type": "string",
                       "required": true
               },
               "2": {
                       "label": "Count",
                       "description": "The number of characters from the right to return",
                       "type": "number",
                       "required": true
               },
               "3": {
                       "label": "result if empty",
                       "description": "The result if the string is empty",
                       "type": "string",
                       "required": false
               }
       }

} </templatedata>

See also

模板:String-handling templates