“模板:Substr any/doc”的版本间的差异
来自问题求解
小 (1个修订) |
|
(没有差异)
|
2012年7月23日 (一) 16:32的最新版本
40px | This is a documentation subpage for 模板:Substr any. It contains usage information, categories, interlanguage links and other content that is not part of the original 模板 page. |
The substring Template:Substr_any extracts a substring of any characters, including accented letters, for a specified offset and length.
Usage
- {{substr_any|text|offset|length}} = Substring of text starting at offset and containing length characters.
Offset from 0: the first character is numbered 0, and so on. The offset + length must be less than 50. Operates on an extended character set, including accented letters, if listed in Template:Str index/getchar.
Examples
- {{substr_any|ABCDEFÄÖÜ |5|2}} returns 2 letters "FÄ".
- {{substr_any|ABCDEFÄÖöÜüÑñß |8|4}} returns the 4 characters starting at the 9th, "öÜüÑ".
- {{substr_any|XYZÈèĖėÇç |5|10}} returns 4 letters "ĖėÇç" as too short for 10.