Шаблон:Trim
Изглед
{{#ifeq:trim |док
|
{{#ifeq:show |show
|| Ово је документациона подстраница за Шаблон:Trim. Садржи информације о коришћењу, категоријама и другом садржају који није део оригиналне странице. |
}}{{#if: |
| {{#ifexist:Шаблон:Trim
| [[Категорија:Документација {{#switch:Шаблон |Шаблон=шаблона |Модул=модула |Корисник=корисничких страница |#default=Википедије}}]]
|
}}
}}
|
}}
| {{#if: |[[File:{{{image}}}|40px|Обавештење]]}} | {{#if: | ' }}This template is for trimming whitespace from strings. For the maintenance tag for images, see {{trimming}} | {{#if: |{{{imageright}}} |{{#if: |}} }} |
This template trims whitespace from a string. The string should be passed as the first unnamed parameter. You may substitute this template - that is, if used as {{subst:trim{{#ifeq:+|-||{{{2}}}}}{{#ifeq:+|-||{{{3}}}}}{{#ifeq:+|-||{{{4}}}}}{{#ifeq:+|-||{{{5}}}}}{{#ifeq:+|-||{{{6}}}}}{{#ifeq:+|-||{{{7}}}}}{{#ifeq:+|-||{{{8}}}}}{{#ifeq:+|-||{{{9}}}}}{{#ifeq:+|-||{{{10}}}}}{{#ifeq:+|-||..}}}}, the resulting wikicode is "clean".
Usage
{{trim|text}} = text with any leading or trailing whitespace removed.
Example
- "
{{{{#if: |замени:}}trim{{#if: abc || abc}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||{{{12}}}}}{{#if: ||{{{13}}}}}{{#if: ||{{{14}}}}}{{#if: ||{{{15}}}}}{{#if: ||{{{16}}}}}{{#if: ||{{{17}}}}}{{#if: ||{{{18}}}}}{{#if: ||{{{19}}}}}{{#if: ||{{{20}}}}}{{#if: ||...}}}}" produces "{{ safesubst:#if:1| abc}}"
Template data
{{#if:|погледајте месечни извештај о грешкама за овај шаблон.|Ово је {{#if:|TemplateData|TemplateData}} документација за овај шаблон, коришћена у Визуелном уређивачу и у другим алаткама; погледајте месечни извештај о грешкама за овај шаблон.}}
{{#ifeq:Trim|sandbox||
TemplateData за Trim
}} <templatedata> {
"description": "The template trims whitespace from a string.",
"params": {
"1": {
"label": "String",
"description": "The string to be trimmed of whitespace",
"type": "string",
"required": true
}
}
} </templatedata>
See also
- {{crop}}