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