expr_to_tridirectional_lilypond_symbol

stringtools.expr_to_tridirectional_lilypond_symbol(expr)

Changes expr to tridirectional LilyPond symbol.

>>> stringtools.expr_to_tridirectional_lilypond_symbol(Up)
'^'
>>> stringtools.expr_to_tridirectional_lilypond_symbol('neutral')
'-'
>>> stringtools.expr_to_tridirectional_lilypond_symbol('default')
'-'
>>> stringtools.expr_to_tridirectional_lilypond_symbol(Down)
'_'
>>> stringtools.expr_to_tridirectional_lilypond_symbol(1)
'^'
>>> stringtools.expr_to_tridirectional_lilypond_symbol(0)
'-'
>>> stringtools.expr_to_tridirectional_lilypond_symbol(-1)
'_'

Returns none when expr is none.

Returns expr when expr is ‘^’, ‘-‘ or ‘_’.

Returns string or none.