Skip to content

jimschubert/stripansi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stripansi

This is a port of Sindre Sorhus's excellent chalk/strip-ansi to Go.

Install

$ go get -u github.com/jimschubert/stripansi

Usage

import (
	"fmt"
	"github.com/jimschubert/stripansi"
)

func main() {
	result := stripansi.String("\x1b[30mfoo\x1b[0m \x1b[30mbar\x1b[0m \x1b[30mbaz\x1b[0m")
	fmt.Println(result)
}

License

This is licensed under MIT.