1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-30 01:03:16 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/filters/removeprefix.tid
Robin Munn 5202441769
Add suffix and parameter to trim operator (#4811)
* Add suffix and parameter to trim operator

Fixes #4809

* Unit tests for new trim operator parameters

* Mention trim operator in 5.1.23 release notes

* Address review comments

* Move regex escaping into utils.js trim functions

This way the trimPrefix and trimSuffix functions from utils.js are safe
to call without regex-escaping their parameters, which should make them
easier to use from other parts of the Javascript code.
2020-08-29 12:27:58 +01:00

18 lines
708 B
Plaintext

created: 20140410103123179
modified: 20150203190709000
tags: [[Filter Operators]] [[String Operators]]
title: removeprefix Operator
type: text/vnd.tiddlywiki
caption: removeprefix
op-purpose: filter the input titles by how they start, deleting that prefix
op-input: a [[selection of titles|Title Selection]]
op-parameter: a string of characters
op-parameter-name: S
op-output: those input titles that start with <<.place S>>, but with those characters discarded
<<.s-matching-is-case-sensitive>>
<<.tip " This filters out input titles that do not start with S. For removing S without filtering out input titles that don't start with S, see [[trim|trim Operator]].">>
<<.operator-examples "removeprefix">>