टेम्पलेट:Trim brackets

विकिपीडिया से
Jump to navigation Jump to search

This template trims leading and trailing square brackets and whitespace from a string. This is similar to {{delink}}, but it won't remove brackets from the middle of the string. The string should be passed as the first unnamed parameter or using |1= if your string contains any = signs. You may substitute this template - that is, if used as {{subst:trim brackets}}, the resulting wikicode is "clean".

बिसयसूची

Usage[संपादन]

{{trim brackets|text}} = text with any leading or trailing square brackets removed (as long as text doesn't contain any = signs).

{{trim brackets|1=text}} = text with any leading or trailing square brackets removed.

Example[संपादन]

  • "{{trim brackets|1= [[abc]], [[def]], and [[ghi]] }}" produces "abc]], def, and [[ghi"
    ("{{delink|1= [[abc]], [[def]], and [[ghi]] }}" produces "abc, def, and ghi").

Template data[संपादन]

This is the TemplateData documentation for this template used by VisualEditor and other tools.

TemplateData for Trim brackets

The template trims leading and trailing square brackets from a string.

Template parameters

ParameterDescriptionTypeStatus
String1

The string to be trimmed

Stringrequired

See also[संपादन]

  • {{delink}}, which does nearly the exact same thing, but also removes balanced pairs of square brackets that aren't leading and trailing and has additional options.
  • {{trim}}
https://bh.wikipedia.org/wiki/%E0%A4%9F%E0%A5%87%E0%A4%AE%E0%A5%8D%E0%A4%AA%E0%A4%B2%E0%A5%87%E0%A4%9F:Trim_brackets
bh.wikipedia.org
crawl=CC-MAIN-2020-05
73516
application/http; msgtype=response
sha1:FZOBU3GLLJB2VAOD4JUF7YJFASOLVJ7H
<urn:uuid:d62be732-610b-4b6c-832f-b0f49acc72d0>
2020-01-26T08:39:33Z
208.80.153.224
text/html
sha1:E7LFT4D4ELZWDBTZJS4ESWZ5GRVZYKPG
<urn:uuid:4caf3cd5-1cf9-4b40-a8cd-d21387349d11>
https://bh.wikipedia.org/wiki/%E0%A4%9F%E0%A5%87%E0%A4%AE%E0%A5%8D%E0%A4%AA%E0%A4%B2%E0%A5%87%E0%A4%9F:Trim_brackets
response
<urn:uuid:34003508-2b21-4995-8fde-8967af5328c5>
isPartOf: CC-MAIN-2020-05
publisher: Common Crawl
description: Wide crawl of the web for January 2020
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-141.ec2.internal
software: Apache Nutch 1.16 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/