1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

Final chunk of docs for new maths/string operators

This commit is contained in:
Jeremy Ruston 2019-06-13 16:53:23 +01:00
parent 73eb7fbd4e
commit fef2ea97a1
29 changed files with 247 additions and 4 deletions

View File

@ -11,7 +11,7 @@ type: text/vnd.tiddlywiki
Added several new [[Mathematics Operators]] for working with numbers: [[negate|negate Operator]], [[abs|abs Operator]], [[ceil|ceil Operator]], [[floor|floor Operator]], [[round|round Operator]], [[trunc|trunc Operator]], [[sign|sign Operator]], [[add|add Operator]], [[subtract|subtract Operator]], [[multiply|multiply Operator]], [[divide|divide Operator]], [[remainder|remainder Operator]], [[max|max Operator]], [[min|min Operator]], [[fixed|fixed Operator]], [[precision|precision Operator]], [[exponential|exponential Operator]], [[sum|sum Operator]], [[product|product Operator]], [[maxall|maxall Operator]] and [[minall|minall Operator]].
Added several new string operators: [[length|length Operator]], [[uppercase|uppercase Operator]], [[lowercase|lowercase Operator]], [[trim|trim Operator]], [[concat|concat Operator]], [[split|split Operator]] and [[join|join Operator]].
Added several new string operators: [[length|length Operator]], [[uppercase|uppercase Operator]], [[lowercase|lowercase Operator]], [[trim|trim Operator]], [[split|split Operator]], [[splitregexp|split Operator]] and [[join|join Operator]].
There is now finer control over TiddlyWiki's default behaviour of removing duplicates from filter resulst, making it much easier to work with the new mathematics and string operators:

View File

@ -1,6 +1,6 @@
created: 20190611174214039
modified: 20190611174245197
tags: [[after Operator]] [[Operator Examples]]
tags: [[abs Operator]] [[Operator Examples]]
title: abs Operator (Examples)
type: text/vnd.tiddlywiki

View File

@ -1,6 +1,6 @@
created: 20190611174446781
modified: 20190611174554787
tags: [[after Operator]] [[Operator Examples]]
tags: [[ceil Operator]] [[Operator Examples]]
title: ceil Operator (Examples)
type: text/vnd.tiddlywiki

View File

@ -0,0 +1,9 @@
created: 20190613084453154
modified: 20190613084521199
tags: [[floor Operator]] [[Operator Examples]]
title: floor Operator (Examples)
type: text/vnd.tiddlywiki
<<.operator-example 1 "[[1.6]floor[]]">>
<<.operator-example 2 "[[-1.6]floor[]]">>
<<.operator-example 3 "=-1.2 =-2.4 =3.6 =4.8 =5.1 +[floor[]]">>

View File

@ -0,0 +1,7 @@
created: 20190613154634914
modified: 20190613154711864
tags: [[join Operator]] [[Operator Examples]]
title: join Operator (Examples)
type: text/vnd.tiddlywiki
<<.operator-example 1 "a b c d e +[join[,]]">>

View File

@ -0,0 +1,8 @@
created: 20190613153325774
modified: 20190613153409962
tags: [[length Operator]] [[Operator Examples]]
title: length Operator (Examples)
type: text/vnd.tiddlywiki
<<.operator-example 1 "[[abc]length[]]">>
<<.operator-example 2 "[tag[HelloThere]length[]]">>

View File

@ -0,0 +1,8 @@
created: 20190613153824151
modified: 20190613153842330
tags: [[lowercase Operator]] [[Operator Examples]]
title: lowercase Operator (Examples)
type: text/vnd.tiddlywiki
<<.operator-example 1 "[[Abc]lowercase[]]">>
<<.operator-example 2 "[tag[HelloThere]lowercase[]]">>

View File

@ -1,6 +1,6 @@
created: 20190611174040931
modified: 20190611174121059
tags: [[after Operator]] [[Operator Examples]]
tags: [[negate Operator]] [[Operator Examples]]
title: negate Operator (Examples)
type: text/vnd.tiddlywiki

View File

@ -0,0 +1,9 @@
created: 20190613084626721
modified: 20190613084651519
tags: [[round Operator]] [[Operator Examples]]
title: round Operator (Examples)
type: text/vnd.tiddlywiki
<<.operator-example 1 "[[1.6]round[]]">>
<<.operator-example 2 "[[-1.6]round[]]">>
<<.operator-example 3 "=-1.2 =-2.4 =3.6 =4.8 =5.1 +[round[]]">>

View File

@ -0,0 +1,9 @@
created: 20190613085050151
modified: 20190613085120851
tags: [[sign Operator]] [[Operator Examples]]
title: sign Operator (Examples)
type: text/vnd.tiddlywiki
<<.operator-example 1 "[[1.6]sign[]]">>
<<.operator-example 2 "[[-1.6]sign[]]">>
<<.operator-example 3 "[[0]sign[]]">>

View File

@ -0,0 +1,8 @@
created: 20190613154338930
modified: 20190613154445868
tags: [[split Operator]] [[Operator Examples]]
title: split Operator (Examples)
type: text/vnd.tiddlywiki
<<.operator-example 1 "[[a b c d e]split[ ]]">>
<<.operator-example 2 "[[Mississippi]split[i]]">>

View File

@ -0,0 +1,7 @@
created: 20190613154934814
modified: 20190613155013565
tags: [[splitregexp Operator]] [[Operator Examples]]
title: splitregexp Operator (Examples)
type: text/vnd.tiddlywiki
<<.operator-example 1 "a=b-c=d-e +[splitregexp[=|-]]">>

View File

@ -0,0 +1,7 @@
created: 20190613153847475
modified: 20190613153924808
tags: [[trim Operator]] [[Operator Examples]]
title: trim Operator (Examples)
type: text/vnd.tiddlywiki
<<.operator-example 1 "[[ a b ]trim[]addprefix[-]addsuffix[-]]">>

View File

@ -0,0 +1,9 @@
created: 20190613084830686
modified: 20190613084854081
tags: [[trunc Operator]] [[Operator Examples]]
title: trunc Operator (Examples)
type: text/vnd.tiddlywiki
<<.operator-example 1 "[[1.6]trunc[]]">>
<<.operator-example 2 "[[-1.6]trunc[]]">>
<<.operator-example 3 "=-1.2 =-2.4 =3.6 =4.8 =5.1 +[trunc[]]">>

View File

@ -0,0 +1,8 @@
created: 20190613153541799
modified: 20190613153642345
tags: [[uppercase Operator]] [[Operator Examples]]
title: uppercase Operator (Examples)
type: text/vnd.tiddlywiki
<<.operator-example 1 "[[Abc]uppercase[]]">>
<<.operator-example 2 "[tag[HelloThere]uppercase[]]">>

View File

@ -0,0 +1,13 @@
caption: floor
created: 20190613084227037
modified: 20190613084450121
op-input: a [[selection of titles|Title Selection]]
op-output: rounds each of the input numbers to the largest integer less than or equal to the given number
op-purpose: rounds a list of numbers to the largest integer less than or equal to each number
tags: [[Unary Mathematics Operators]] [[Filter Operators]] [[Mathematics Operators]]
title: floor Operator
type: text/vnd.tiddlywiki
<<.from-version "5.1.20">> See [[Mathematics Operators]] for an overview.
<<.operator-examples "floor">>

View File

@ -0,0 +1,15 @@
caption: split
created: 20190613154502541
modified: 20190613154632657
op-input: a [[selection of titles|Title Selection]]
op-output: the input titles joined together with the separator <<.place S>>
op-parameter: the separator to insert between each of the items
op-parameter-name: S
op-purpose: join a list of strings together with the separator <<.place S>>
tags: [[Filter Operators]]
title: join Operator
type: text/vnd.tiddlywiki
<<.from-version "5.1.20">>
<<.operator-examples "join">>

View File

@ -0,0 +1,13 @@
caption: length
created: 20190613153225735
modified: 20190613153321546
op-input: a [[selection of titles|Title Selection]]
op-output: replaces each input title with its length as an integer
op-purpose: returns the lengths of each item in the list
tags: [[Filter Operators]]
title: length Operator
type: text/vnd.tiddlywiki
<<.from-version "5.1.20">>
<<.operator-examples "length">>

View File

@ -0,0 +1,15 @@
caption: lowercase
created: 20190613153650010
modified: 20190613153726427
op-input: a [[selection of titles|Title Selection]]
op-output: the input titles with each uppercase letter replaced by the equivalent lowercase letter
op-purpose: returns each item in the list as lowercase
tags: [[Filter Operators]]
title: lowercase Operator
type: text/vnd.tiddlywiki
<<.from-version "5.1.20">>
See also [[uppercase Operator]].
<<.operator-examples "lowercase">>

View File

@ -0,0 +1,13 @@
caption: round
created: 20190613084541416
modified: 20190613084623913
op-input: a [[selection of titles|Title Selection]]
op-output: rounds each of the input numbers to the nearest integer
op-purpose: rounds a list of numbers to the nearest integer
tags: [[Unary Mathematics Operators]] [[Filter Operators]] [[Mathematics Operators]]
title: round Operator
type: text/vnd.tiddlywiki
<<.from-version "5.1.20">> See [[Mathematics Operators]] for an overview.
<<.operator-examples "round">>

View File

@ -0,0 +1,13 @@
caption: sign
created: 20190613084919354
modified: 20190613085044655
op-input: a [[selection of titles|Title Selection]]
op-output: replaces each input number with -1, 0 or +1 according to whether the number is negative, zero, or positive
op-purpose: return -1, 0 or +1 for a list of numbers according to whether each number is negative, zero, or positive
tags: [[Unary Mathematics Operators]] [[Filter Operators]] [[Mathematics Operators]]
title: sign Operator
type: text/vnd.tiddlywiki
<<.from-version "5.1.20">> See [[Mathematics Operators]] for an overview.
<<.operator-examples "sign">>

View File

@ -0,0 +1,15 @@
caption: split
created: 20190613153944647
modified: 20190613154541225
op-input: a [[selection of titles|Title Selection]]
op-output: the input titles split into separate items according to the specified separator <<.place S>>
op-parameter: The substring at which to split each title
op-parameter-name: S
op-purpose: returns each item in the list split into separate strings according to the specified separator <<.place S>>
tags: [[Filter Operators]]
title: split Operator
type: text/vnd.tiddlywiki
<<.from-version "5.1.20">>
<<.operator-examples "split">>

View File

@ -0,0 +1,16 @@
caption: splitregexp
created: 20190613154722705
modified: 20190613154924724
op-input: a [[selection of titles|Title Selection]]
op-output: the input titles split into separate items according to the specified regular expression <<.place R>>
op-parameter: The regular expression at which to split each title
op-parameter-name: R
op-purpose: returns each item in the list split into separate strings according to the specified regular expression <<.place R>>
op-suffix: flags: ''m'' for multiline mode, ''i'' for case-insensitive mode
tags: [[Filter Operators]]
title: splitregexp Operator
type: text/vnd.tiddlywiki
<<.from-version "5.1.20">>
<<.operator-examples "splitregexp">>

View File

@ -0,0 +1,13 @@
caption: trim
created: 20190613153740241
modified: 20190613153820282
op-input: a [[selection of titles|Title Selection]]
op-output: the input titles with whitespace trimmed from the start and end
op-purpose: returns each item in the list with whitespace trimmed from the start and end
tags: [[Filter Operators]]
title: trim Operator
type: text/vnd.tiddlywiki
<<.from-version "5.1.20">>
<<.operator-examples "trim">>

View File

@ -0,0 +1,13 @@
caption: trunc
created: 20190613084703801
modified: 20190613084829253
op-input: a [[selection of titles|Title Selection]]
op-output: truncates each of the input numbers to their integer part, removing any fractional part
op-purpose: truncates a list of numbers to their integer part, removing any fractional part
tags: [[Unary Mathematics Operators]] [[Filter Operators]] [[Mathematics Operators]]
title: trunc Operator
type: text/vnd.tiddlywiki
<<.from-version "5.1.20">> See [[Mathematics Operators]] for an overview.
<<.operator-examples "trunc">>

View File

@ -0,0 +1,15 @@
caption: uppercase
created: 20190613153420821
modified: 20190613153538557
op-input: a [[selection of titles|Title Selection]]
op-output: the input titles with each lowercase letter replaced by the equivalent uppercase letter
op-purpose: returns each item in the list as uppercase
tags: [[Filter Operators]]
title: uppercase Operator
type: text/vnd.tiddlywiki
<<.from-version "5.1.20">>
See also [[lowercase Operator]].
<<.operator-examples "uppercase">>