| 1 |
// +build go1.7,!go1.10 |
| 2 |
|
| 3 |
package textseg |
| 4 |
|
| 5 |
import ( |
| 6 |
v9 "github.com/apparentlymart/go-textseg/v9/textseg" |
| 7 |
) |
| 8 |
|
| 9 |
// ScanGraphemeClusters is a split function for bufio.Scanner that splits on |
| 10 |
// grapheme cluster boundaries, using the text segmentation rules from the |
| 11 |
// Unicode version selected by the current Go runtime library. |
| 12 |
// |
| 13 |
// This function will appear to be missing if your current Go version is not |
| 14 |
// supported by your current version of this package. |
| 15 |
func ScanGraphemeClusters(data []byte, atEOF bool) (int, []byte, error) { |
| 16 |
return v9.ScanGraphemeClusters(data, atEOF) |
| 17 |
} |
| 18 |
|
| 19 |
// UnicodeMajorVersion is the major version of Unicode being used by this |
| 20 |
// package. This should always match the first portion of the string returned |
| 21 |
// by unicode.Version in the Go standard library. |
| 22 |
const UnicodeMajorVersion = 9 |