A pipeline is a serie of function that may transform a variable value
${variable | function | function | ... }
where:
capitalize is a function that will make the first letter of each word an uppercase letter (ie capital letter)
Syntax:
capitalize()
Example:
${description | capitalize()}
Output:
A Pipeline Permits To Transform A Variable Value With A Succession Of Transformation Function.
cut is a function that will split the string in parts and returned the asked part concatenated. If the separator is not found, the original string is returned
Syntax:
cut("separator",selector)
where:
Example:
${description | cut(" ","10-")}
Output:
a succession of transformation function.
${description | cut(" ",2)}
Output:
pipeline
${title | cut("-",2)}
Output:
ComboStrap Pipeline
head is a function that will extract the first words that are in the maximal length specified.
Syntax:
head($length, $tail)
where:
For instance:
${description | head(20 , "...")}
Output:
A pipeline permits to...
rconcat is a function that will concatenate a string to the right. It's deprecated for the tail argument of the head function.
Syntax:
rconcat($string)
For instance:
${description | head(20) | rconcat("...")}
Output:
A pipeline permits to...
replace is a function that will search a string and replace it.
Syntax:
replace($search, $replace)
For instance:
${title | replace("Pipeline","Pipe-line")}
Output:
ComboStrap Pipe-line
trim is a function that strip whitespace from the beginning and end of a string
Syntax:
trim()
For instance:
${title | trim()}
Output:
ComboStrap Pipeline
The format function permits to format a date.
Syntax:
format(pattern, locale)
where:
The normal names produce a normal date format for the country (region). The supported normal names are:
Name | Date | Time |
---|---|---|
short | 12/13/52 | 3:30pm |
medium | Jan. 12, 1952 | |
long | January 12, 1952 | 3:30:32pm |
full | Tuesday, April 12, 1952 | 3:30:42pm PST |
For instance:
${now | format()}
Thursday, November 21, 2024
${now | format('full short')}
Thursday, November 21, 2024 at 1:05 PM
${now | format('mmm dd yyyy')}
005 21 2024
For more example, see the dedicated date page