Slight adjustment to TitleCase
This commit is contained in:
parent
c4526d4d2c
commit
604fbea7de
1 changed files with 11 additions and 11 deletions
|
@ -167,18 +167,18 @@ func TitleCase(n string) string {
|
|||
for start < ln {
|
||||
// Find the start and end of the underscores to account
|
||||
// for the possibility of being multiple underscores in a row.
|
||||
if end < ln && name[start] == '_' {
|
||||
if end < ln {
|
||||
if name[start] == '_' {
|
||||
start++
|
||||
end++
|
||||
continue
|
||||
}
|
||||
|
||||
// Once we have found the end of the underscores, we can
|
||||
// find the end of the first full word.
|
||||
if end < ln && name[end] != '_' {
|
||||
} else if name[end] != '_' {
|
||||
end++
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
word := name[start:end]
|
||||
var vowels bool
|
||||
|
|
Loading…
Reference in a new issue