Files
addon/lib/guessit/rules/match_processors.py
2020-04-29 17:44:46 +02:00

21 lines
379 B
Python

"""
Match processors
"""
from common import seps
def strip(match, chars=seps):
"""
Strip given characters from match.
:param chars:
:param match:
:return:
"""
while match.input_string[match.start] in chars:
match.start += 1
while match.input_string[match.end - 1] in chars:
match.end -= 1
if not match:
return False