codekingpro/portable-devtools
115k
1# join.awk --- join an array into a string2#3# This file and how to use it are described in the manual.4# Therefore, we respectfully advise you to Read The Fine Manual5# for more information.6#7# Arnold Robbins, arnold@skeeve.com, Public Domain8# May 19939 10function join(array, start, end, sep, result, i)11{12 if (sep == "")13 sep = " "14 else if (sep == SUBSEP) # magic value15 sep = ""16 result = array[start]17 for (i = start + 1; i <= end; i++)18 result = result sep array[i]19 return result20}21 