-def get_value(lines, token, start, end = 0):
- i = find_token(lines, token, start, end)
+
+def get_value(lines, token, start, end = 0, default = ""):
+ """ get_value(lines, token, start[[, end], default]) -> list of strings
+
+ Return tokens after token for the first line, in lines, where
+ token is the first element."""
+
+ i = find_token_exact(lines, token, start, end)
+ if i == -1:
+ return default
+ if len(lines[i].split()) > 1:
+ return lines[i].split()[1]
+ else:
+ return default
+
+
+def get_value_string(lines, token, start, end = 0, trim = False, default = ""):
+ """ get_value_string(lines, token, start[[, end], trim, default]) -> string
+
+ Return tokens after token as string, in lines, where
+ token is the first element. When trim is used, the first and last character
+ of the string is trimmed."""
+
+ i = find_token_exact(lines, token, start, end)