bestplay
GitHub
6 yıl önce
ebeveyn
işleme
f2ad438e9e
Veri tabanında bu imza için bilinen anahtar bulunamadı
GPG Anahtar Kimliği: 4AEE18F83AFDEB23
1 değiştirilmiş dosya ile
1 ekleme ve
1 silme
-
snake.go
|
|
@@ -13,7 +13,7 @@ func ToSnake(s string) string { |
|
|
|
for i, v := range s { |
|
|
|
// treat acronyms as words, eg for JSONData -> JSON is a whole word |
|
|
|
preIsCapital := false |
|
|
|
if i - 1 > 0 { |
|
|
|
if i > 0 { |
|
|
|
w := s[i-1] |
|
|
|
preIsCapital = w >= 'A' && w <= 'Z' |
|
|
|
} |
|
|
|