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:
tuple of str

returns the name and the specifier (without delimiter) in a tuple

Examples

>>> str_spec('hello')
('hello', None)
>>> str_spec('hello{TEST}')
('hello', 'TEST')