Difference between revisions of "Template:Str ≤ len"

From Ava Zinn Wiki
Jump to: navigation, search
[unchecked revision][unchecked revision]
(Reverting edit by Debresser to last version by David (me). No, this template is semi-protected, and the {{pp-template}} is nowadays for both semi and fully protected templates.)
(ifeq is too smart, it understands numbers. So adding "x" in front of the strings. But then we need to remove any whitespace around the first string, thus the {{#if:x|}}.)
Line 1: Line 1:
 
{{#switch:
 
{{#switch:
   {{#ifeq:{{{1|}}}|{{padleft:{{{1|}}}|{{{2|}}} }}    <!-- str >= len -->
+
   {{#ifeq:x{{#if:x|{{{1|}}}}}|x{{padleft:{{{1|}}}|{{{2|}}} }}    <!-- str >= len -->
   | {{#ifeq:{{{1|}}}|{{padleft:|{{{2|}}}|{{{1|}}} }}  <!-- str == len -->
+
   | {{#ifeq:x{{#if:x|{{{1|}}}}}|x{{padleft:|{{{2|}}}|{{{1|}}} }}  <!-- str == len -->
 
     | equal
 
     | equal
 
     | longer
 
     | longer

Revision as of 06:45, 26 March 2009


Documentation icon Template documentation[create]