Extension:ValentoExt

ValentoExt is a small suit of parser functions to handle various string operations. It was developed by Valento in collaboration with Galaxian to aid in creating specific templates for this wiki (Metabattle), although it can also be used by other wikis if they see fit.

It currently offers the following functions:

{{#scount:<string1>|<string2>}}

Counts how many times <string2> is contained in <string1>.

Example
{{#scount:One, Two, Three, Two, Two, Four|Two}}
3
{{#duplicate:<string>|<n>|<delim>}}

Duplicates <string> <n> times, separating with an optional delimiter <delim>.

Example
{{#duplicate:NyanCat|5|, }}
NyanCat, NyanCat, NyanCat, NyanCat, NyanCat
{{#uniquearr:<string array>|<delim>}}

Removes duplicated entries from <string array>. A delimiter <delim> is required so the function knows how to split the string array correctly to re-adjust it.

Example
{{#uniquearr:My-string-string-array-separated-by-by-hyphen|-}}
My-string-array-separated-by-hyphen
Premium Membership

Upgrade to premium membership and take advantage of all the premium benefits, including complete ad removal across the entire website, for only $8.99 per year! Click here for more info.