0
0
Fork 0
mirror of https://github.com/crazy-max/diun.git synced 2025-01-12 19:48:12 +00:00
crazy-max_diun/vendor/github.com/jedib0t/go-pretty/v6/text/direction.go
2024-12-14 22:30:21 +01:00

24 lines
489 B
Go

package text
// Direction defines the overall flow of text. Similar to bidi.Direction, but
// simplified and specific to this package.
type Direction int
// Available Directions.
const (
Default Direction = iota
LeftToRight
RightToLeft
)
// Modifier returns a character to force the given direction for the text that
// follows the modifier.
func (d Direction) Modifier() string {
switch d {
case LeftToRight:
return "\u202a"
case RightToLeft:
return "\u202b"
}
return ""
}