fix measure for ckj character

This commit is contained in:
everyx 2014-02-22 22:38:15 +08:00
parent e6523e8703
commit bfa6fa1771

View File

@ -31,7 +31,7 @@ func main() {
foundLongLine := false
lines := readLines(sourcePath)
for i, line := range lines {
if !foundLongLine && !commentPat.MatchString(line) && (len(line) > 58) {
if !foundLongLine && !commentPat.MatchString(line) && (utf8.RuneCountInString(line) > 58) {
fmt.Printf("measure: %s:%d\n", sourcePath, i+1)
foundLongLine = true
foundLongFile = true