The string-prefixer Template:Strloc prefix gets the prefix of a string up to a specified location, or the entire string when location is less than 1.
| This is a documentation subpage for Template:Strloc prefix. It may contain usage information, categories and other content that is not part of the original template page. |
The string-prefixer Template:Strloc prefix gets the prefix of a string up to a specified location, or the entire string when location is less than 1.
Returns the prefix of string1 up to location strloc=n, where n = 1 denotes the first character of the string. If strloc <= 0 then the entire string1 is the result. The parameter strloc can be a math formula, such as: strloc={{{len}}}-2, or strloc=abs(-2*5)+6.
The following show various uses:
The text extracted is subject to the limitations of parser functions {#ifexpr:} and {padleft:}. In particular, spaces around the prefixed string are dropped, and NOT counted, before or after:
Spaces embedded within the prefix string are real spaces (NOT " "), and any accented or special characters can be used in the string.
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.