• ♡ Sponsor

    stripEnd

    #Strip

    Strips a substring from the end of a string.

    @{ variable | stripEnd (end) }
    

    Parameters

    end
    The substring to be stripped from the end of a variable value.

    Example

    To strip a file extension from the end of a PNG file, you can use this:

    @{ :basename | stripEnd ('.png') }
    

    Related

    Pipe  ⁄
    shorten — Pipe

    Shortens a string to a given number of characters and appends an optional ellipsis, without cutting off words. To avoid open or incomplete HTML tags, all tags will be removed before shortening a string.

    Pipe  ⁄
    stripStart — Pipe

    Strips a substring from the start of a string.

    Pipe  ⁄
    stripTags — Pipe

    Removes all Markdown syntax and HTML tags from a variable value. This function doesn't expect any parameters.

    • Automad
    • Developer Guide
    • Building Themes
    • Template Language
    • Pipe
    • stripEnd
    Discuss
    Packages
    Release Notes
    Support
    Terms of Use
      Become a Sponsor
      GitHub
      Twitter
      Facebook
      Instagram
      2013-2023 by Marc Anton Dahmen
    Released under the MIT license

    A faceless machine, creating one's portrait in the internet.
  • Automad
  • Getting Started
  • System
  • User Guide
  • Developer Guide
  • Headless Mode
  • Discuss
  • Packages
  • Developer Guide ←
  • Building Themes ←
  • Template Language ←
  • Pipe
  • ceil
  • dateFormat
  • def
  • escape
  • findFirstImage
  • findFirstParagraph
  • floor
  • markdown
  • match
  • replace
  • round
  • sanitize
  • shorten
  • stripEnd
  • stripStart
  • stripTags
  • strlen
  • strtolower
  • strtoupper
  • ucwords