Skip to content

This will take a given string and add text to the end of it. The text will not be added to the given string if the string already ends with the text.

Notifications You must be signed in to change notification settings

jasoncomes/End-With-Liquid-Filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

endwith

This will take a given string and add text to the end of it. The text will not be added to the given string if the string already ends with the text.

Usage

{{ string | endwith: append }}

Parameters

  • string string. required. The string of text to have something appended to it
  • append string. required. The text to append to the end of the string.

Return

  • string. This will output a string.

Example

Input

{{ "https://google.com" | endwith: "/feeling-lucky/" }}

Output

https://google.com/feeling-lucky/

About

This will take a given string and add text to the end of it. The text will not be added to the given string if the string already ends with the text.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages