summaryrefslogtreecommitdiff
path: root/awk/utils.awk
diff options
context:
space:
mode:
authorLeon Rische <leon.rische@me.com>2020-05-01 14:13:10 +0200
committerLeon Rische <leon.rische@me.com>2020-05-01 14:13:20 +0200
commita2aa55e2855e415ee52a46e36bdfa2060a01f744 (patch)
tree1c4052190a7b1b5b1f10c8b1c5ba2dc99a4091cf /awk/utils.awk
parentba0307070ccccdd195a96af9214b69340beecb1d (diff)
Track tags in position indexer
Diffstat (limited to 'awk/utils.awk')
-rw-r--r--awk/utils.awk9
1 files changed, 9 insertions, 0 deletions
diff --git a/awk/utils.awk b/awk/utils.awk
index 01295a2..7384ea0 100644
--- a/awk/utils.awk
+++ b/awk/utils.awk
@@ -21,3 +21,12 @@ function time_days_ago(n) {
function or_default(var, def) {
return (var != "") ? var : def;
}
+
+# Combine two tag strings
+function combine_tags(tags1, tags2) {
+ if (tags1 == "") {
+ return tags2;
+ } else {
+ return substr(tags1, 0, length(tags1) - 1) tags2
+ }
+}