Shift X2 status from legacy to archived
[khatus.git] / awk / lib / str.awk
1 function str_join(array, from, to, sep_given, str, sep, i) {
2 str = ""
3 sep = ""
4 for (i=from; i<=to; i++) {
5 str = str sep array[i]
6 sep = sep_given
7 }
8 return str
9 }
10
11 function str_tail(head, full, tail, len_tail, len_head, len_full) {
12 len_full = length(full)
13 len_head = length(head)
14 len_tail = len_full - len_head
15 tail = substr(full, len_head + 1, len_tail)
16 return tail
17 }
18
19 function str_strip(s) {
20 sub("^ *", "", s)
21 sub(" *$", "", s)
22 return s
23 }
This page took 0.076819 seconds and 4 git commands to generate.