+
+function read_property() {
+ key = $1
+ # Yes, the sequence (x-1+1) is redundant, but it keeps the variable names
+ # true to their meaning:
+ val_begin = index($0, "\"") + 1 # +1 to exclude first quote
+ val_end = length($0) - 1 # -1 to exclude last quote
+ val_len = (val_end - val_begin) + 1 # +1 to include final character
+ val = substr($0, val_begin, val_len)
+ properties[sink, key] = val
+}