str_spec
- sisl.utils.str_spec(name) Tuple[str, None | str] [source]
Split into a tuple of name and specifier, delimited by
{...}
.- Parameters:
name (
str
) – string to split- Returns:
tuple
ofstr
– returns the name and the specifier (without delimiter) in a tuple
Examples
>>> str_spec("hello") ("hello", None) >>> str_spec("hello{TEST}") ("hello", "TEST")