Template:Str mid: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>DePiep j minimised |
m 70 revisions imported |
||
| (20 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{str mid/core | {{str mid/core | ||
| s={{{1|}}} | | s={{{1|}}} | ||
| i={{#if: | | i={{#if:{{{2|}}}}|{{{2|}}}|{{#ifexpr:({{#if:{{{3|}}}|1|0}} and {{#if:{{{4|}}}|1|0}})|{{#expr:{{min|{{{4|}}}|{{#invoke:String|len|{{trim|{{{1|}}}}}}}}}-{{{3|}}}+{{#ifexpr:{{{3|}}}<0|-1|1}}}}|1}}}} | ||
| j={{# | | j={{min|{{#invoke:String|len|{{trim|{{{1|}}}}}}}|{{#if:{{{4|}}}|{{{4|}}}|{{#if:{{{3|}}}|{{#expr:{{#if:{{{2|}}}|{{{2|}}}|1}}+{{{3|}}}+{{#ifexpr:{{{3|}}}<0|1|-1}}}}|}}}}}} | ||
| slen={{#invoke:String|len|{{trim|{{{1|}}}}}}} | | slen={{#invoke:String|len|{{trim|{{{1|}}}}}}} | ||
| sublen={{formatnum:{{{3|}}}}} | | sublen={{formatnum:{{{3|}}}}} | ||
| invert={{#ifexpr:{{formatnum:{{#ifeq:{{{3|}}}||0|{{{3|}}}}}}}<0|yes|no}} | | invert={{#ifexpr:{{formatnum:{{#ifeq:{{{3|}}}||0|{{{3|}}}}}}}<0|yes|no}} | ||
| triangle check={{#if: | | triangle check={{#if:{{{2|}}}|{{#if:{{{3|}}}|{{#if:{{{4|}}}|{{#ifexpr:(({{{4|}}}-{{{2|0}}}+1)<>{{{3|0}}}) and ({{{2|}}}*{{{4|}}}<>0)|Error using {{tl|Str mid}}: indexes i={{{2|}}} and j={{{4|}}} do not match requested substring length {{trim|{{{3|}}}}}}}|}}}}}} | ||
|ignore_errors={{{ignore errors|false}}} | |ignore_errors={{{ignore errors|false}}} | ||
|error_category={{yesno|{{{error category|}}}|yes={{{error category|}}}}} | |error_category={{yesno|{{{error category|}}}|yes={{{error category|}}}}} | ||
|no_category={{{no category|false}}}}}<noinclude> | |no_category={{{no category|false}}} | ||
|dbg_in=_IN:_i2={{{2|u}}}_sublen3={{{3|u}}}_j4={{{4|u}}}_min={{min|{{{4|}}}|{{str len|{{trim|{{{1|}}}}}}}}} | |||
|dbg=no | |||
}}<noinclude> | |||
* {{tl|Str mid}} | |||
* {{tl|Str mid/core}} | |||
* {{tl|Str mid/testcases}} | |||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> | ||
Latest revision as of 13:55, 3 September 2020
- {{Str mid}}
- {{Str mid/core}}
- {{Str mid/testcases}}