Skip to content
/ offset Public

Calculates byte offset for unicode files by line and column

License

Notifications You must be signed in to change notification settings

pokstad/offset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Offset is a simple tool for calculating the byte offset for a rune in a file at a specificed line and column number.

Offset is both usable as an executable:

# Install with go get

$ go get github.com/pokstad/offset

# Run with a file arg
$ offset -source test.go -line 3 -column 20
38

# Or omit file arg to provide STDIN:
$ offset -line 1 -column 2
hello
2

Or as a Go package:

GoDoc

About

Calculates byte offset for unicode files by line and column

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages