Selaa lähdekoodia

Update snake.go

tags/v0.1.0
bestplay GitHub 6 vuotta sitten
vanhempi
commit
f2ad438e9e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. +1
    -1
      snake.go

+ 1
- 1
snake.go Näytä tiedosto

@@ -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'
}


Loading…
Peruuta
Tallenna