Module:String2/doc: Difference between revisions

Content deleted Content added
split: nowiki template
Stringsplit: One2a function
Line 193:
Named parameters force the trimming of leading and trailing spaces in the parameters and are generally clearer when used:
* <code><nowiki>{{Stringsplit | txt=Apples pears oranges; Cats dogs | sep="%A+" | idx=3 | plain=false }}</nowiki></code> → {{Stringsplit | txt=Apples pears oranges; Cats dogs | sep="%A+" | idx=3 | plain=false }}
 
=== One2a ===
[[Template:One2a]] is a convenience wrapper for the one2 function.
* <code><nowiki>{{one2a |one foot. One mile. One inch.One amp. one foot. one mile. one inch. Alone at last.}}</nowiki></code> → {{one2a |one foot. One mile. One inch.One amp. one foot. one mile. one inch. Alone at last.}}
* <code><nowiki>{{convert|1|ft|spell=on}}</nowiki></code> → {{convert|1|ft|spell=on}}
* <code><nowiki>{{one2a|{{convert|1|ft|spell=on}}}}</nowiki></code> → {{one2a|{{convert|1|ft|spell=on}}}}
* <code><nowiki>{{convert|2.54|cm|0|disp=out|spell=on}}</nowiki></code> → {{convert|2.54|cm|0|disp=out|spell=on}}
* <code><nowiki>{{one2a|{{convert|2.54|cm|0|disp=out|spell=on}}}}</nowiki></code> → {{one2a|{{convert|2.54|cm|0|disp=out|spell=on}}}}
 
== See also ==