Difference between revisions of "Πρότυπο:First item of a comma separated list"

From protonation
Jump to navigation Jump to search
 
Line 2: Line 2:
 
|Uses MediaWiki extension=StringFunctions
 
|Uses MediaWiki extension=StringFunctions
 
}}
 
}}
<includeonly><onlyinclude>{{#sub:{{{1|}}}|0|{{#pos:{{{1|}}}|,}} }}</onlyinclude></includeonly>
+
<includeonly><onlyinclude>{{#explode:{{{1|}}}|,|0}}</onlyinclude></includeonly>

Latest revision as of 04:21, 24 May 2020


Template properties [edit]
Required extensions
{{
i
}} Template documentation [edit]


Returns the first item of a comma separated list.

Use

{{first item of a comma separated list|string}}

Example

{{first item of a comma separated list|foo, bar, boo}}

Result:

foo

See also