Modèle:Str sub long
Apparence
Documentation
Cette documentation est incluse dans la sous-page de documentation (voir | modifier | historique). Si vous voulez améliorer ce modèle et si celui-ci est protégé, demandez à un administrateur de vous aider.
Ce modèle utilise le module String, un script écrit dans le langage de programmation Lua. Toute expérimentation devrait être conduite d’abord via une sous-page bac à sable ou dans votre espace utilisateur. Voir le Projet:Scribunto (de la Wikipédia en français) si vous voulez en savoir plus.
Utilisation
[modifier]Description du rôle de ce modèle à compléter.
Syntaxe
[modifier]{{Str sub long|text|start|length}}
= Substring of text starting at start and containing length characters. Base 0: the first character is numbered 0, and so on, e.g. {{Str sub long|20090624130510|8|2}} returns the 2 characters starting at the 9th, i.e. "13"
Paramètres
[modifier]The template takes a substring of ''text'' starting at ''start'' and containing ''length'' characters.
Paramètre | Description | Type | État | |
---|---|---|---|---|
Text | 1 | The substring to be trimmed. | Chaîne | obligatoire |
Numeric position | 2 | Numeric position of the starting character within the string | Nombre | obligatoire |
Count | 3 | Number of characters for the substring | Nombre | obligatoire |