Package ascii provides tools for working with ASCII characters, for the Go programming language.
Find a file
2025-08-30 18:11:01 -07:00
go.mod go.mod 2025-08-30 11:35:36 -07:00
LICENSE update links in LICENSE 2024-03-01 15:53:18 -08:00
names.go flow control constants 2024-03-01 16:20:50 -08:00
README.md github.com -> codeberg.org 2025-08-30 18:11:01 -07:00
shortcodes.go flow control constants 2024-03-01 16:20:50 -08:00

go-ascii

Package ascii provides tools for working with ASCII characters, for the Go programming language.

Documention

Online documentation, which includes examples, can be found at: http://godoc.org/codeberg.org/reiver/go-ascii

GoDoc

Example

Here is an example of using the longer versions of the ASCII constants:

import (
	"codeberg.org/reiver/go-ascii"
)

// ...

var byte b

// ...

switch b {
case ascii.BackSpace:
	// ...
case ascii.HorizontalTab:
	// ...
case ascii.LineFeed:
	// ...
case ascii.Delete:
	// ...
default:
	// ...
}

Here is an example of using the longer versions of the ASCII constants:

import (
	"codeberg.org/reiver/go-ascii"
)

// ...

var byte b

// ...

switch b {
case ascii.BS
	// ...
case ascii.HT:
	// ...
case ascii.LF:
	// ...
case ascii.DEL:
	// ...
default:
	// ...
}

Import

To import package ascii use import code like the following:

import "codeberg.org/reiver/go-ascii"

Installation

To install package ascii do the following:

GOPROXY=direct go get codeberg.org/reiver/go-ascii

Author

Package ascii was written by Charles Iliya Krempeaux