We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a6d089d + c1ff160 commit b2e7f7aCopy full SHA for b2e7f7a
KakaJSON/Extension/String+KJ.swift
@@ -42,7 +42,7 @@ public extension KJ where Base: ExpressibleByStringLiteral {
42
guard let str = base as? String else { return "" }
43
var newStr = ""
44
for c in str {
45
- if ("A"..."Z").contains(c) {
+ if c.isUppercase {
46
newStr += "_"
47
newStr += c.lowercased()
48
} else {
0 commit comments