in Common/AWSSCV-ContactFlowHelper/Code/awsscv_contact_flow_helper/awsscv_contact_flow_helper.py [0:0]
def strip_text(operation_parameters):
text_to_strip = operation_parameters['text_string']
what_to_strip = operation_parameters['strip_this']
strip_mode = operation_parameters['mode']
if strip_mode == 'trim':
result = text_to_strip.strip(what_to_strip)
if strip_mode == 'right':
result = text_to_strip.rstrip(what_to_strip)
if strip_mode == 'left':
result = text_to_strip.lstrip(what_to_strip)
return result