diff options
author | Bence Ferdinandy <bence@ferdinandy.com> | 2024-07-10 22:26:22 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-08-03 17:41:15 +0200 |
commit | 9d8d74d9bf438c337ac0d6eed1b5dede5cc0ceb2 (patch) | |
tree | be09268e158dfbe03bf20fa0582f4ddf704e95ac /lib/pama/switch.go | |
parent | f8b74a9a9f1b607e20f7b5654e85b03be34ce0ed (diff) | |
download | aerc-9d8d74d9bf438c337ac0d6eed1b5dede5cc0ceb2.tar.gz |
templates: add head and tail functions
Add head and tail functions to get beginning or ends of strings.
E.g.:
{{"hello" | head 2}} will return "he"
{{"hello" | tail 2}} will return "lo"
Implements: https://todo.sr.ht/~rjarry/aerc/220
Changelog-added: New `head` and `tail` templates functions for strings.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'lib/pama/switch.go')
0 files changed, 0 insertions, 0 deletions