Base filters in Strinken.dll
Here is the list of all base filters that are defined in Strinken.dll.Name | Description | Usage |
---|---|---|
IfEqual or ? | Does an equality test with the input and the specified value and renders a value depending on the output of the test. | {tag:IfEqual+value,valueIfTrue,valueIfFalse} or {tag:?+value,valueIfTrue,valueIfFalse} |
Length | Transforms the input into its length. | {tag:Length} |
Lower | Transforms the input to lowercase. | {tag:Lower} |
Null or ?? | Returns the specified argument if the input is null. | {tag:Null+valueIfNull} or {tag:??+valueIfNull} |
Repeat or * | Repeats the input as many times as specified. | {tag:Repeat+numberOfTimes} or {tag:*+numberOfTimes} |
Replace | Takes some couples of arguments, and replace each occurrence of each first argument by the second. | {tag:Replace+value1,replaceValue1,value2,replaceValue2...} |
Upper | Transforms the input to uppercase. | {tag:Upper} |
Zeros | Formats the input with leading zeros until reaching the specified length. | {tag:Zeros+numberOfLeadingZeros} |
Base filters modification
The BaseFilters class provide two methods for interacting with base filters :Register
: Adds a new parser to the list of base filter.Unregister
: Removes a parser from the list of base filter.
Each filter in the base filters must have an unique name, and for the deregistration, only the name is used, no type check is done (to allow the deregistration of base filters presents in the assembly, whose type are not directly available).
A parser will only get the base filters that are currently set at the time of its creation. If you add or remove a filter from the base filters after the parser creation, the parser won't be affected.