3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-28 23:09:39 +01:00

doc/Factoids.md: add :join() to expansion-modifiers

This commit is contained in:
Pragmatic Software 2020-06-04 20:31:51 -07:00
parent 71236da93f
commit e05f6fb6c0

View File

@ -409,6 +409,7 @@ Selection Modifier | Description
`:-sort` | Sorts the selected list in descending order.
`:comma` | Converts a selected list to a comma-separated list.
`:enumerate` | Converts a selected list to a comma-separated list with `and` replacing the final comma.
`:join([s])` | Converts a selected list to an `s`-separated list. `s` is a string optionally enclosed in quotes.
<pragma-> !echo $colors:pick(5):comma
<PBot> red, bright yellow, blue, dark purple, orange
@ -416,6 +417,12 @@ Selection Modifier | Description
<pragma-> !echo $colors:pick(5):enumerate
<PBot> blue, green, dark purple, orange and bright yellow
<pragma-> !echo $colors:pick(5):join('::')
<PBot> red::orange::bright yellow::green
<pragma-> !echo $colors:pick(3):join()
<PBot> greenorangeblue
And finally, text modifiers alter the selected values.
<pragma-> !echo $colors:uc