Skip to content

Commit

Permalink
Properties with repeated letters are lowercased #19
Browse files Browse the repository at this point in the history
  • Loading branch information
hermiteer committed Mar 1, 2016
1 parent 31a9977 commit f48f53d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/CottonObject.m
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,9 @@ - (void) setObject:(id)object forSetter:(SEL)setter
key = [key substringWithRange:range];

// turn the first character into a lower case letter
NSString* character = [key substringToIndex:1];
key = [key stringByReplacingCharactersInRange:NSMakeRange(0, 1)
withString:character.lowercaseString];
range = NSMakeRange(0, 1);
NSString* character = [[key substringToIndex:1] lowercaseString];
key = [key stringByReplacingCharactersInRange:range withString:character];

// insert or remove
[self setObject:object forKey:key];
Expand Down

0 comments on commit f48f53d

Please sign in to comment.