टेम्पलेट:Str len: रिवीजन सभ के बीचा में अंतर

Content deleted Content added
imported>Happy-melon
छो Reverted edits by Happy-melon (talk) to last version by Dragons flight
imported>Davidgothberg
Copying this new string length template from my user-space sandbox.
लाइन 1:
{{#ifeq: x{{#if:x|{{{1|}}}}} | x{{padleft:{{{1|}}}| 500 }} <!-- str >= 500 -->
<includeonly>{{#switch:*{{{1|}}}*
| 500
|**=0
| {{#expr: <!-- "expr" removes leading spaces and zeros -->
|{{str_left|*{{{1}}}*|3}}=1
{{str len full/core <!-- xx0-xx9 -->
|{{str_left|*{{{1}}}*|4}}=2
|{{str_left#if:x|*{{{1|}}}*|5}}=3
| {{str len full/core <!-- x0x-x9x -->
|{{str_left|*{{{1}}}*|6}}=4
|{{str_left#if:x|*{{{1|}}}*|7}}=5
| {{str len full/core <!-- 0xx-4xx -->
|{{str_left|*{{{1}}}*|8}}=6
|{{str_left#if:x|*{{{1|}}}*|9}}=7
| |00
|{{str_left|*{{{1}}}*|10}}=8
}}|0
|{{str_left|*{{{1}}}*|11}}=9
}}|
|{{str_left|*{{{1}}}*|12}}=10
}}
|{{str_left|*{{{1}}}*|13}}=11
}}
|{{str_left|*{{{1}}}*|14}}=12
}}</includeonly><noinclude>
|{{str_left|*{{{1}}}*|15}}=13
|{{str_left|*{{{1}}}*|16}}=14
|{{str_left|*{{{1}}}*|17}}=15
|{{str_left|*{{{1}}}*|18}}=16
|{{str_left|*{{{1}}}*|19}}=17
|{{str_left|*{{{1}}}*|20}}=18
|{{str_left|*{{{1}}}*|21}}=19
|{{str_left|*{{{1}}}*|22}}=20
|{{str_left|*{{{1}}}*|23}}=21
|{{str_left|*{{{1}}}*|24}}=22
|{{str_left|*{{{1}}}*|25}}=23
|{{str_left|*{{{1}}}*|26}}=24
|{{str_left|*{{{1}}}*|27}}=25
|{{str_left|*{{{1}}}*|28}}=26
|{{str_left|*{{{1}}}*|29}}=27
|{{str_left|*{{{1}}}*|30}}=28
|{{str_left|*{{{1}}}*|31}}=29
|{{str_left|*{{{1}}}*|32}}=30
|{{str_left|*{{{1}}}*|33}}=31
|{{str_left|*{{{1}}}*|34}}=32
|{{str_left|*{{{1}}}*|35}}=33
|{{str_left|*{{{1}}}*|36}}=34
|{{str_left|*{{{1}}}*|37}}=35
|{{str_left|*{{{1}}}*|38}}=36
|{{str_left|*{{{1}}}*|39}}=37
|{{str_left|*{{{1}}}*|40}}=38
|{{str_left|*{{{1}}}*|41}}=39
|{{str_left|*{{{1}}}*|42}}=40
|{{str_left|*{{{1}}}*|43}}=41
|{{str_left|*{{{1}}}*|44}}=42
|{{str_left|*{{{1}}}*|45}}=43
|{{str_left|*{{{1}}}*|46}}=44
|{{str_left|*{{{1}}}*|47}}=45
|{{str_left|*{{{1}}}*|48}}=46
|{{str_left|*{{{1}}}*|49}}=47
|{{str_left|*{{{1}}}*|50}}=48
|{{str_left|*{{{1}}}*|51}}=49
|{{str_left|*{{{1}}}*|52}}=50
|{{str_left|*{{{1}}}*|53}}=51
|{{str_left|*{{{1}}}*|54}}=52
|{{str_left|*{{{1}}}*|55}}=53
|{{str_left|*{{{1}}}*|56}}=54
|{{str_left|*{{{1}}}*|57}}=55
|{{str_left|*{{{1}}}*|58}}=56
|{{str_left|*{{{1}}}*|59}}=57
|{{str_left|*{{{1}}}*|60}}=58
|{{str_left|*{{{1}}}*|61}}=59
|{{str_left|*{{{1}}}*|62}}=60
|{{str_left|*{{{1}}}*|63}}=61
|{{str_left|*{{{1}}}*|64}}=62
|{{str_left|*{{{1}}}*|65}}=63
|{{str_left|*{{{1}}}*|66}}=64
|{{str_left|*{{{1}}}*|67}}=65
|{{str_left|*{{{1}}}*|68}}=66
|{{str_left|*{{{1}}}*|69}}=67
|{{str_left|*{{{1}}}*|70}}=68
|{{str_left|*{{{1}}}*|71}}=69
|{{str_left|*{{{1}}}*|72}}=70
|{{str_left|*{{{1}}}*|73}}=71
|{{str_left|*{{{1}}}*|74}}=72
|{{str_left|*{{{1}}}*|75}}=73
|{{str_left|*{{{1}}}*|76}}=74
|{{str_left|*{{{1}}}*|77}}=75
|{{str_left|*{{{1}}}*|78}}=76
|{{str_left|*{{{1}}}*|79}}=77
|{{str_left|*{{{1}}}*|80}}=78
|{{str_left|*{{{1}}}*|81}}=79
|{{str_left|*{{{1}}}*|82}}=80
|{{FormattingError|String longer than max string length of 80}}
}}</includeonly><noinclude>
 
<!-- {{pp-template}} -->
<nowiki>{{str_len|</nowiki>''text''<nowiki>}}</nowiki> = Length of ''text''. Max acceptable length is 80.
{{documentation}}
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
[[Category:String manipulation templates]]
</noinclude>