textwidth

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2021 License: MIT-0 Imports: 3 Imported by: 0

Documentation

Overview

textwidth provides functions for getting the fixed-width width of unicode byte slices, runes and strings.

https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms#In_Unicode

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RuneWidth

func RuneWidth(r rune) int

RuneWidth returns fixed-width width of rune.

func StringWidth

func StringWidth(s string) (n int)

StringWidth returns fixed-width width of string.

func Width added in v0.3.0

func Width(b []byte) (n int)

Width returns fixed-width width of byte slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL