Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance 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

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /