expr_to_tridirectional_direction_string

stringtools.expr_to_tridirectional_direction_string(expr)

Changes expr to tridirectional direction string.

>>> stringtools.expr_to_tridirectional_direction_string('^')
'up'
>>> stringtools.expr_to_tridirectional_direction_string('-')
'center'
>>> stringtools.expr_to_tridirectional_direction_string('_')
'down'
>>> stringtools.expr_to_tridirectional_direction_string(1)
'up'
>>> stringtools.expr_to_tridirectional_direction_string(0)
'center'
>>> stringtools.expr_to_tridirectional_direction_string(-1)
'down'
>>> stringtools.expr_to_tridirectional_direction_string('default')
'center'

Returns none when expr is none.

Returns string or none.