Str len/core: 두 판 사이의 차이
조무위키
imported>노구리 (틀:Str len/core 문서로 넘겨주기) |
imported>노구리 편집 요약 없음 |
||
1번째 줄: | 1번째 줄: | ||
# | {{{{{|안전풀기:}}}#switch: {{{3|}}} | ||
| hundreds = <noinclude><!-- 0xx-4xx, using linear search since most strings will probably be less than 100 bytes. --></noinclude> | |||
{{{{{|안전풀기:}}}#ifeq: x{{{1|}}} | x{{{{{|안전풀기:}}}padleft:{{{1|}}}| 100 }} <noinclude><!--str >= x--></noinclude> | |||
| {{{{{|안전풀기:}}}#ifeq: x{{{1|}}} | x{{{{{|안전풀기:}}}padleft:{{{1|}}}| 200 }} | |||
| {{{{{|안전풀기:}}}#ifeq: x{{{1|}}} | x{{{{{|안전풀기:}}}padleft:{{{1|}}}| 300 }} | |||
| {{{{{|안전풀기:}}}#ifeq: x{{{1|}}} | x{{{{{|안전풀기:}}}padleft:{{{1|}}}| 400 }} | |||
| 4 | |||
| 3 | |||
}} | |||
| 2 | |||
}} | |||
| 1 | |||
}} | |||
| <noinclude><!-- Don't return 0, since tens and ones don't want a leading 0 in parameter 2. --></noinclude> | |||
}} | |||
| tens = <noinclude><!-- x0x-x9x, using linear search for 0x-3x, binary search for 4x-9x, since most strings will probably be 0-39 bytes. --></noinclude> | |||
{{{2|}}}{{ | |||
{{{|안전풀기:}}}#ifeq: x{{{1|}}} | x{{{{{|안전풀기:}}}padleft:{{{1|}}}| {{{2|}}}10 }} <noinclude><!--str >= x--></noinclude> | |||
| {{{{{|안전풀기:}}}#ifeq: x{{{1|}}} | x{{{{{|안전풀기:}}}padleft:{{{1|}}}| {{{2|}}}20 }} | |||
| {{{{{|안전풀기:}}}#ifeq: x{{{1|}}} | x{{{{{|안전풀기:}}}padleft:{{{1|}}}| {{{2|}}}30 }} | |||
| {{{{{|안전풀기:}}}#ifeq: x{{{1|}}} | x{{{{{|안전풀기:}}}padleft:{{{1|}}}| {{{2|}}}40 }} | |||
| {{{{{|안전풀기:}}}#ifeq: x{{{1|}}} | x{{{{{|안전풀기:}}}padleft:{{{1|}}}| {{{2|}}}60 }} | |||
| {{{{{|안전풀기:}}}#ifeq: x{{{1|}}} | x{{{{{|안전풀기:}}}padleft:{{{1|}}}| {{{2|}}}80 }} | |||
| {{{{{|안전풀기:}}}#ifeq: x{{{1|}}} | x{{{{{|안전풀기:}}}padleft:{{{1|}}}| {{{2|}}}90 }} | |||
| 9 | |||
| 8 | |||
}} | |||
| {{{{{|안전풀기:}}}#ifeq: x{{{1|}}} | x{{{{{|안전풀기:}}}padleft:{{{1|}}}| {{{2|}}}70 }} | |||
| 7 | |||
| 6 | |||
}} | |||
}} | |||
| {{{{{|안전풀기:}}}#ifeq: x{{{1|}}} | x{{{{{|안전풀기:}}}padleft:{{{1|}}}| {{{2|}}}50 }} | |||
| 5 | |||
| 4 | |||
}} | |||
}} | |||
| 3 | |||
}} | |||
| 2 | |||
}} | |||
| 1 | |||
}} | |||
| {{{{{|안전풀기:}}}#if:{{{2|}}}|0}} <noinclude><!-- Only return 0 if >=100, since ones don't want a leading 0 in parameter 2. --></noinclude> | |||
}} | |||
| ones = <noinclude><!-- xx0-xx9, using binary search. --></noinclude> | |||
{{{2|}}}{{ | |||
{{{|안전풀기:}}}#ifeq: x{{{1|}}} | x{{{{{|안전풀기:}}}padleft:{{{1|}}}| {{{2|}}}4 }} <noinclude><!--str >= x--></noinclude> | |||
| {{{{{|안전풀기:}}}#ifeq: x{{{1|}}} | x{{{{{|안전풀기:}}}padleft:{{{1|}}}| {{{2|}}}6 }} | |||
| {{{{{|안전풀기:}}}#ifeq: x{{{1|}}} | x{{{{{|안전풀기:}}}padleft:{{{1|}}}| {{{2|}}}8 }} | |||
| {{{{{|안전풀기:}}}#ifeq: x{{{1|}}} | x{{{{{|안전풀기:}}}padleft:{{{1|}}}| {{{2|}}}9 }} | |||
| 9 | |||
| 8 | |||
}} | |||
| {{{{{|안전풀기:}}}#ifeq: x{{{1|}}} | x{{{{{|안전풀기:}}}padleft:{{{1|}}}| {{{2|}}}7 }} | |||
| 7 | |||
| 6 | |||
}} | |||
}} | |||
| {{{{{|안전풀기:}}}#ifeq: x{{{1|}}} | x{{{{{|안전풀기:}}}padleft:{{{1|}}}| {{{2|}}}5 }} | |||
| 5 | |||
| 4 | |||
}} | |||
}} | |||
| {{{{{|안전풀기:}}}#ifeq: x{{{1|}}} | x{{{{{|안전풀기:}}}padleft:{{{1|}}}| {{{2|}}}2 }} | |||
| {{{{{|안전풀기:}}}#ifeq: x{{{1|}}} | x{{{{{|안전풀기:}}}padleft:{{{1|}}}| {{{2|}}}3 }} | |||
| 3 | |||
| 2 | |||
}} | |||
| {{{{{|안전풀기:}}}#ifeq: x{{{1|}}} | x{{{{{|안전풀기:}}}padleft:{{{1|}}}| {{{2|}}}1 }} | |||
| 1 | |||
| 0 | |||
}} | |||
}} | |||
}} | |||
}}<noinclude> | |||
{{설명문서}} | |||
</noinclude> |
2020년 8월 6일 (목) 01:51 기준 최신판
{{#ifeq: core | 연습장
|
{{틀 연습장 안내}
}}{{틀 기타
|