Vorlage:Str right
Die Vorlage entfernt Leerzeichen am Anfang und am Ende und die Anzahl Zeichen von links beginnend von der in Text angegebenen Zeichenkette.
Ist der Wert für Anzahl kleiner 0, wird 0 angenommen.
Ist der Wert für Anzahl gleich oder größer als die Länge von Text, so wird eine leere Zeichenkette zurückgegeben.
Ist der Wert für Anzahl kleiner 0, wird 0 angenommen.
Ist der Wert für Anzahl gleich oder größer als die Länge von Text, so wird eine leere Zeichenkette zurückgegeben.
Vorlagenparameter
| Parameter | Beschreibung | Typ | Status | |
|---|---|---|---|---|
| Text | 1 | Zeichenkette
| Mehrzeiliger Text | erforderlich |
| Anzahl | 2 | Anzahl Zeichen ohne Berücksichtigung führender Leerzeichen, die von Text links abgeschnitten werden.
| Zahlenwert | optional |
Kopiervorlagen
{{Str right | | }}
Falls Gleichheitszeichen (=) in den Parameterinhalten vorkommen:
{{Str right
|1=
|2=
}}
Beispiele
| Code | Ergebnis | Info |
|---|---|---|
"{{Str right}}" |
"" | Text und Anzahl weggelassen |
"{{Str right| Autobus}}" |
"Autobus" | Anzahl weggelassen |
"{{Str right|Autobus|-3}}" |
"Autobus" | Anzahl negativ |
"{{Str right| Autobus|7}}" |
"" | |
"{{Str right| |2}}" |
"" | Text besteht aus 4 Leerzeichen |
"{{Str right| lorem ipsum dolor sit amet | 10 }}" |
"m dolor sit amet" | |
"{{Str right| lorem ipsum dolor sit amet | 1 }}" |
"orem ipsum dolor sit amet" | |
"{{Str right| lorem ipsum dolor sit amet | 0 }}" |
"lorem ipsum dolor sit amet" | |
"{{Str right| 123456789.123456789.123456789.1 |29}}" |
".1" |
Siehe auch
Lua
Verwendetes Modul: Str
Werkzeuge
Content Disclaimer
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.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.