Template:Str mid
{{#ifexpr:({{#if:||1}}=0) or ({{#invoke:String|len|{{ safesubst:#if:1|}}}}=0)|
|{{#if:{{#if:|{{#if:|{{#if:|{{#ifexpr:((-0+1)<>0) and (*<>0)|Error using {{[[{{#switch:
|#default = Str mid
| =
{{#ifeq: |
| Template:Str mid
| Str mid
}}
}}|Str mid]]{{#if:||{{{arg}}}}}}}: indexes i= and j= do not match requested substring length {{ safesubst:#if:1|}}}}|}}}}}}|{{#invoke:Error|error|{{#if:|{{#if:|{{#if:|{{#ifexpr:((-0+1)<>0) and (*<>0)|Error using {{[[{{#switch:
|#default = Str mid
| =
{{#ifeq: |
| Template:Str mid
| Str mid
}}
}}|Str mid]]{{#if:||{{{arg}}}}}}}: indexes i= and j= do not match requested substring length {{ safesubst:#if:1|}}}}|}}}}}}|tag=}}
|{{#invoke:String|sub
|s= |i={{#ifeq:{{#ifexpr:{{#ifeq:||0|}}<0|yes|no}}|yes|{{#invoke:Math|min}}|{{#if:}||{{#ifexpr:({{#if:|1|0}} and {{#if:|1|0}})|{{#expr:{{#invoke:Math|min}}-+{{#ifexpr:<0|-1|1}}}}|1}}}}}} |j={{#ifeq:{{#ifexpr:{{#ifeq:||0|}}<0|yes|no}}|yes|{{#if:}||{{#ifexpr:({{#if:|1|0}} and {{#if:|1|0}})|{{#expr:{{#invoke:Math|min}}-+{{#ifexpr:<0|-1|1}}}}|1}}}}|{{#invoke:Math|min}}}} |ignore_errors=false |{{#if:{{safesubst:#switch:
|no |n |false |f |否 |0 = | = |¬ = |yes |y |true |t |是 |1 = |#default =
}}|error_category={{safesubst:#switch:
|no |n |false |f |否 |0 = | = |¬ = |yes |y |true |t |是 |1 = |#default =
}}}} |no_category=false}}}}}}{{safesubst:#switch: no
|no
|n
|false
|f
|否
|0 =
| =
|¬ =
|yes
|y
|true
|t
|是
|1 = _IN:_i2=u_sublen3=u_j4=u_min={{#invoke:Math|min}}_CORE:slen:{{#invoke:String|len|{{ safesubst:#if:1|}}}}_i={{#if:}||{{#ifexpr:({{#if:|1|0}} and {{#if:|1|0}})|{{#expr:{{#invoke:Math|min}}-+{{#ifexpr:<0|-1|1}}}}|1}}}}_j={{#invoke:Math|min}}_inv={{#ifexpr:{{#ifeq:||0|}}<0|yes|no}}_tchk={{#if:{{#if:|{{#if:|{{#if:|{{#ifexpr:((-0+1)<>0) and (*<>0)|Error using {{[[{{#switch:
|#default = Str mid
| =
{{#ifeq: |
| Template:Str mid
| Str mid
}}
}}|Str mid]]{{#if:||{{{arg}}}}}}}: indexes i= and j= do not match requested substring length {{ safesubst:#if:1|}}}}|}}}}}}|TCHK|-}}_blankexpr:{{#expr:({{#if:||1}}=0) or ({{#invoke:String|len|{{ safesubst:#if:1|}}}}=0)}}
|#default = _IN:_i2=u_sublen3=u_j4=u_min={{#invoke:Math|min}}_CORE:slen:{{#invoke:String|len|{{ safesubst:#if:1|}}}}_i={{#if:}||{{#ifexpr:({{#if:|1|0}} and {{#if:|1|0}})|{{#expr:{{#invoke:Math|min}}-+{{#ifexpr:<0|-1|1}}}}|1}}}}_j={{#invoke:Math|min}}_inv={{#ifexpr:{{#ifeq:||0|}}<0|yes|no}}_tchk={{#if:{{#if:|{{#if:|{{#if:|{{#ifexpr:((-0+1)<>0) and (*<>0)|Error using {{[[{{#switch:
|#default = Str mid
| =
{{#ifeq: |
| Template:Str mid
| Str mid
}}
}}|Str mid]]{{#if:||{{{arg}}}}}}}: indexes i= and j= do not match requested substring length {{ safesubst:#if:1|}}}}|}}}}}}|TCHK|-}}_blankexpr:{{#expr:({{#if:||1}}=0) or ({{#invoke:String|len|{{ safesubst:#if:1|}}}}=0)}} }}
- {{[[{{#switch:
|#default = Str mid
| =
{{#ifeq: |
| Template:Str mid
| Str mid
}}
}}|Str mid]]{{#if:||{{{arg}}}}}}}
- {{[[{{#switch:
|#default = Str mid/core
| =
{{#ifeq: |
| Template:Str mid/core
| Str mid/core
}}
}}|Str mid/core]]{{#if:||{{{arg}}}}}}}
- {{[[{{#switch:
|#default = Str mid/testcases
| =
{{#ifeq: |
| Template:Str mid/testcases
| Str mid/testcases
}}
}}|Str mid/testcases]]{{#if:||{{{arg}}}}}}} {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}

