Template:Str len: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Davidgothberg
Feeding the numbered parameters as numbers instead, to get white space stripping. Slightly more efficient, and simpler code. Tested in the /sandbox.
Ookami (talk | contribs)
m 32 revisions imported
 
(8 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{#ifeq: x{{#if:x|{{{1|}}}}} | x{{padleft:{{{1|}}}| 500 }}  <!-- str >= 500 -->
{{{{{|safesubst:}}}#invoke:String|len|s={{{1|}}}}}<noinclude>
| 500
{{documentation}}
| {{str len/core/sandbox  <!-- xx0-xx9 -->
  | 1 = {{{1|}}}
  | 2 = {{str len/core/sandbox  <!-- x0x-x9x -->
    | 1 = {{{1|}}}
    | 2 = {{str len/core/sandbox  <!-- 0xx-4xx -->
      | 1 = {{{1|}}}
      | 2 =
      | 3 = hundreds
      }}
    | 3 = tens
    }}
  | 3 = ones
  }}
}}<noinclude>


{{pp-template}}
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
</noinclude>

Latest revision as of 04:34, 3 September 2020

0