This commit is contained in:
1 parent
74d21cb204
commit
7d3b6804af
5 files changed
+220
-15
No files matched your search
@@ -141,6 +141,13 @@ func trimSpaceASCII(s string) string {
|
||||
return strings.Trim(s, " \t\n\r")
|
||||
}
|
||||
|
||||
// collapseWhitespace trims and collapses every whitespace run (including
|
||||
// full-width spaces) to a single ASCII space. Used as the dedupe key so
|
||||
// layout-padded variants of one term share a single translation unit.
|
||||
func collapseWhitespace(s string) string {
|
||||
return strings.Join(strings.Fields(s), " ")
|
||||
}
|
||||
|
||||
// itoa is a tiny helper so this file needs no strconv import noise.
|
||||
func itoa(i int) string {
|
||||
if i == 0 {
|
||||
|
||||
Reference in new issue
Block a user