Documentation ¶
Index ¶
- Variables
- func FillLeft(s string, w int) string
- func FillRight(s string, w int) string
- func IsAmbiguousWidth(r rune) bool
- func IsNeutralWidth(r rune) bool
- func RuneWidth(r rune) int
- func StringWidth(s string) (width int)
- func Truncate(s string, w int, tail string) string
- func Wrap(s string, w int) string
- type Condition
- func (c *Condition) FillLeft(s string, w int) string
- func (c *Condition) FillRight(s string, w int) string
- func (c *Condition) RuneWidth(r rune) int
- func (c *Condition) StringWidth(s string) (width int)
- func (c *Condition) Truncate(s string, w int, tail string) string
- func (c *Condition) Wrap(s string, w int) string
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultCondition = &Condition{ZeroWidthJoiner: true} // DefaultCondition is a condition in current locale
)
Functions ¶
func IsAmbiguousWidth ¶
IsAmbiguousWidth returns whether is ambiguous width or not.
func IsNeutralWidth ¶
IsNeutralWidth returns whether is neutral width or not.
func RuneWidth ¶
RuneWidth returns the number of cells in r. See http://www.unicode.org/reports/tr11/
Types ¶
type Condition ¶
type Condition struct {
ZeroWidthJoiner bool
}
func NewCondition ¶
NewCondition return new instance of Condition which is current locale.
func (*Condition) RuneWidth ¶
RuneWidth returns the number of cells in r - see http://www.unicode.org/reports/tr11/
func (*Condition) StringWidth ¶
StringWidth return width as you can see
Click to show internal directories.
Click to hide internal directories.