chore: improve titleCasedName performance #1691

Merged
lunny merged 2 commits from performance into master 2020-05-23 02:24:10 +00:00
Showing only changes of commit 1637507361 - Show all commits

View File

@ -114,7 +114,7 @@ func titleCasedName(name string) string {
case upNextChar:
upNextChar = false
if 'a' <= c && c <= 'z' {
c += 'a' - 'A'
c -= 'a' - 'A'

I will change to c -= 'a' - 'A'

I will change to `c -= 'a' - 'A'`
}
case c == '_':
upNextChar = true