User:Toomai/Flags template

From SmashWiki, the Super Smash Bros. wiki
Jump to navigationJump to search

{{subst:#replace:{{subst:#replace:{{subst:#replace:{{subst:#replace:{{subst:#replace:{{subst:#replace:{{subst:#replace:{{subst:#replace:{{subst:#replace:{{subst:#replace:{{subst:#replace:{{subst:#replace:{{subst:#replace:{{subst:#replace:{{subst:#replace:{{subst:#replace:{{subst:#replace:{{subst:#replace:{{subst:lc:{{{1}}}}}|0|....}}|1|...-}}|2|..-.}}|3|..--}}|4|.-..}}|5|.-.-}}|6|.--.}}|7|.---}}|8|-...}}|9|-..-}}|a|-.-.}}|b|-.--}}|c|--..}}|d|--.-}}|e|---.}}|f|----}}|.|0}}|-|1}}

This is a one-time-only conversion template to turn raw flag data from hex 39030200 into binary 00111001000000110000001000000000. It's a pretty expensive conversion (nests 20 deep out of an allowable 40), so I don't want it to be done in real-time (since further work has to be done on the binary string). It'll kinda suck to have 32 digits in the page source as opposed to 8, but wutryagonado.