Skip to content

Commit

Permalink
feat: implement stringwriter
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Jun 14, 2024
1 parent db791fa commit c1d03fb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@ func (w *Writer) Write(p []byte) (int, error) {
return int(n), err
}

// WriteString writes the given text to the underlying writer.
func (w *Writer) WriteString(s string) (n int, err error) {
return w.Write([]byte(s))
}

func readColor(idxp *int, seq *ansi.CsiSequence) (c ansi.Color) {
i := *idxp
paramsLen := len(seq.Params)
Expand Down

0 comments on commit c1d03fb

Please sign in to comment.