xonsh.lib.string¶
- xonsh.lib.string.commonprefix(m: Iterable[str]) str[source]¶
Given an iterable of strings, returns the longest common leading substring
- xonsh.lib.string.endswith_newline(s: str) str[source]¶
Return a string ending with exactly one newline character.
- xonsh.lib.string.is_balanced(expr: str, ltok: str, rtok: str) bool[source]¶
Determines whether an expression has unbalanced opening and closing tokens.
- xonsh.lib.string.subexpr_before_unbalanced(expr: str, ltok: str, rtok: str) str[source]¶
Obtains the expression prior to last unbalanced left token.