Skip to content

Commit

Permalink
Added an example to the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Gaynor committed Jun 28, 2019
1 parent 99dc89b commit 1232f6b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,14 @@ for {
}
```

If you have an input where the indices are expressed in unicode codepoints, and
not raw bytes fixedwidth supports this. Your data must be UTF-8 encoded:

```go
decoder := fixedwidth.NewDecoder(strings.NewReader(data))
decoder.SetUseCodepointIndices(true)
// Decode as usual now
```

## Licence
MIT

0 comments on commit 1232f6b

Please sign in to comment.