Skip to content

Commit

Permalink
Moved rules comment
Browse files Browse the repository at this point in the history
  • Loading branch information
imbue11235 committed Jun 16, 2021
1 parent 53eaf12 commit d3e67b1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions extract.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
// Package words provides capabilities for splitting
// a string into a slice of words by a collection of rules
//
package words

import (
"unicode"
"unicode/utf8"
)

// Rules:
// 1. Invalid UTF8-strings will not be split
// 2. Hyphenated words will be treated as individual words unless disabled. E.g. "small-town" => []{"small", "town"}
Expand All @@ -9,12 +15,6 @@
// 4. Characters of same type in sequence, will be put together.
// 5. If the current character is a lowercase, and the last character of the previous word was uppercase,
// the uppercase letter will be moved to the lowercase string. E.g. "YAMLParser" => []{"YAML", "Parser"}
package words

import (
"unicode"
"unicode/utf8"
)

const (
symbol = 1 + iota
Expand Down

0 comments on commit d3e67b1

Please sign in to comment.