ResSimpy.Nexus.nexus_file_operations.get_token_value
- ResSimpy.Nexus.nexus_file_operations.get_token_value(token: str, token_line: str, file_list: list[str], ignore_values: list[str] | None = None, replace_with: str | VariableEntry | None = None) str | None[source]
Gets the value following a token if supplied with a line containing the token.
- Parameters:
token (str) – the token being searched for.
token_line (str) – string value of the line that the token was found in.
file_list (list[str]) – a list of strings containing each line of the file as a new entry
ignore_values (list[str], optional) – a list of values that should be ignored if found. Defaults to None.
replace_with (Union[str, VariableEntry, None], optional) – a value to replace the existing value with. Defaults to None.
- Returns:
Optional[str] – The value following the supplied token, if it is present.