mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-10 22:39:43 +00:00
![Ben Webber](/assets/img/avatar_default.png)
* Support case insensitive matching in prefix/suffix operators Support `caseinsensitive`/`caseinsensitive` suffixes in the following filter operators: * prefix * suffix * removeprefix * removesuffix The suffixes have the same behaviour as in the match operator. Closes: #6407 * Do not filter titles if suffix/removesuffix operand is empty Issue: #6407
33 lines
1.3 KiB
Plaintext
33 lines
1.3 KiB
Plaintext
created: 20140828133830424
|
|
modified: 20220218023400000
|
|
tags: [[Filter Operators]] [[String Operators]]
|
|
title: removesuffix Operator
|
|
type: text/vnd.tiddlywiki
|
|
caption: removesuffix
|
|
op-purpose: filter the input titles by how they end, deleting that suffix
|
|
op-input: a [[selection of titles|Title Selection]]
|
|
op-parameter: a string of characters
|
|
op-parameter-name: S
|
|
op-output: those input titles that end with <<.place S>>, but with those characters discarded
|
|
op-suffix: the <<.op removesuffix>> operator uses a rich suffix, see below for details
|
|
|
|
<<.tip " This filters out input titles that do not end with S. For removing S without filtering out input titles that don't end with S, see [[trim|trim Operator]].">>
|
|
|
|
<<.from-version "5.2.2">>
|
|
|
|
The <<.op removesuffix>> operator uses an extended syntax that permits multiple flags to be passed:
|
|
|
|
```
|
|
[removesuffix:<flag list>[<operand>]]
|
|
```
|
|
|
|
* ''flag list'': a comma delimited list of flags
|
|
* ''operand'': filter operand
|
|
|
|
The available flags are:
|
|
|
|
* ''casesensitive'': (default), this flag forces a case-sensitive match, where upper and lower case letters are considered different
|
|
* ''caseinsensitive'': overrides the default so that upper and lower case letters are considered identical for matching purposes
|
|
|
|
<<.operator-examples "removesuffix">>
|