mirror of
https://github.com/crazy-max/diun.git
synced 2025-01-08 17:53:09 +00:00
6f7b5b313d
Bumps [github.com/jedib0t/go-pretty/v6](https://github.com/jedib0t/go-pretty) from 6.5.9 to 6.6.5. - [Release notes](https://github.com/jedib0t/go-pretty/releases) - [Commits](https://github.com/jedib0t/go-pretty/compare/v6.5.9...v6.6.5) --- updated-dependencies: - dependency-name: github.com/jedib0t/go-pretty/v6 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
29 lines
554 B
Go
29 lines
554 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
|
|
)
|
|
|
|
const (
|
|
RuneL2R = '\u202a'
|
|
RuneR2L = '\u202b'
|
|
)
|
|
|
|
// 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 string(RuneL2R)
|
|
case RightToLeft:
|
|
return string(RuneR2L)
|
|
}
|
|
return ""
|
|
}
|