expr_to_tridirectional_ordinal_constant

stringtools.expr_to_tridirectional_ordinal_constant(expr)

Changes expr to tridirectional ordinal constant.

>>> stringtools.expr_to_tridirectional_ordinal_constant('^')
Up
>>> stringtools.expr_to_tridirectional_ordinal_constant('_')
Down
>>> stringtools.expr_to_tridirectional_ordinal_constant(1)
Up
>>> stringtools.expr_to_tridirectional_ordinal_constant(-1)
Down

Returns expr when expr is Up‘, Center or Down.

Returns ordinal constant or none.