expr_to_bidirectional_direction_string

stringtools.expr_to_bidirectional_direction_string(expr)

Changes expr to bidirectional direction string.

>>> stringtools.expr_to_bidirectional_direction_string('^')
'up'
>>> stringtools.expr_to_bidirectional_direction_string('_')
'down'
>>> stringtools.expr_to_bidirectional_direction_string(1)
'up'
>>> stringtools.expr_to_bidirectional_direction_string(-1)
'down'

Returns expr when expr is ‘up’ or ‘down’.

Returns string or none.