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.unquote(s: str, chars: str = '\'"') → str[source]

Strip one pair of matching quote characters from a string.