amayne / SwiftString

A comprehensive, lightweight string extension for Swift
MIT License
1.62k stars 141 forks source link

Make camelize consistently use lower camel case #10

Closed raylillywhite closed 6 years ago

raylillywhite commented 8 years ago

Looks like camelize was only ensuring that the first letter was lowercase when there was only one word. This applies does that for the multi-word case. I also removed an unnecessary cast to NSString and moved the call to lowercaseString to the end so that it only needs to be applied to the one character.