模板:Str find/doc
这是Template:Str find模板的说明文件页面。 本文件并不是为直接浏览而撰写。若是其中使用了跨维基计划连结,某些连结可能会显示损毁。请勿将这些连结替换为硬编码的页面名称或网址。 |
![]() | 使用Lua语言编写: |
用法[编辑]
{{str find|text|sub_string}} = 在字串text中搜寻并返回特定字串sub_string的位置。
- Only searches first 50 characters of text. Returns -1 if sub_string not found in first 50 characters.
- Character position is 1 based (not 0 based as usual in calculations
参见[编辑]
{{Strfind short}}
(如果使用Str find引致模板“扩展深度超出限制”,可尝试改用Strfind short。)