aa

package
v0.0.0-...-aad3e44 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func GetLooksLength

func GetLooksLength(text string) int

GetLooksLength は見た目上のテキストの長さを返す。 例:

a  == 1
あ == 2
漢 == 2
b == 2

見た目上の長さを特別扱いしたい文字などが登場したらここに追加していく感じでヨロ!

func MaxOfLooksLength

func MaxOfLooksLength(s ...string) int

MaxOfLooksLength は引数に渡された文字列のうち見た目上の長さが最大なものの長さを返す

Types

type AsciiArt

type AsciiArt []string

type IPrintableAsciiArt

type IPrintableAsciiArt interface {
	Load(font string) error
}

IPrintableAsciiArt は出力可能なアスキーアートを表す

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter(w io.Writer) Writer

NewWriter はAAをio.Writerに出力するやつ

func (*Writer) SetColorful

func (w *Writer) SetColorful(b bool)

SetColorful はランダムに色付けするようにするかどうかのON/OFFを設定する

func (*Writer) SetColorfulAlways

func (w *Writer) SetColorfulAlways(b bool)

SetColorfulAlways は SetColorful に加えて パイプやリダイレクト時にも色付けを強制するかどうかのON/OFFを設定する

func (*Writer) SetDuration

func (w *Writer) SetDuration(d time.Duration)

SetDuration は SetTimes で2回以上出力するように指定したときのインターバルを設定する

func (*Writer) SetInsertEmpty

func (w *Writer) SetInsertEmpty(b bool)

SetInsertEmpty は出力時に1行目に必ず空行を出力するかどうかのON/OFFを設定する

func (*Writer) SetOffset

func (w *Writer) SetOffset(offset int)

SetOffset は左端からのAA出力位置の値をセットする

func (*Writer) SetOverwrite

func (w *Writer) SetOverwrite(b bool)

SetOverwrite は SetTimes で2回以上出力する場合に 同じ場所へ上書きするかどうかのON/OFFを設定する

func (*Writer) SetTimes

func (w *Writer) SetTimes(times int)

SetTimes はAAの出力回数を設定する

func (*Writer) Write

func (w *Writer) Write(aa []string) error

Write はアスキーアートを出力する

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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