Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
0a8a07a
Bool: Support init from y,n,yes,no any case, false,true added upperca…
JoeMatt Jan 31, 2019
ae4d50a
KeyedEncoding: Add new string formatters, capitalized, lowercased, up…
JoeMatt Jan 31, 2019
e65d30b
SharedBoxProtocol: Generalize for any Box inheritance
JoeMatt Jan 31, 2019
99fde81
Remove junk string in BreakfastTest xml
JoeMatt Jan 31, 2019
38b79a2
Element coding, remove empty brackets if element string value is empt…
JoeMatt Jan 31, 2019
0300dd1
Add DynamicNodeEncoding protocol
JoeMatt Jan 31, 2019
14549a6
XMLEncoder: Add both option to value encoding, refactor encoder
JoeMatt Jan 31, 2019
f8c594a
XMLDecoder.XMLDecodingStorage refactor initial value to inline var
JoeMatt Jan 31, 2019
2ee4b03
Clear up most swiftlint warnings
JoeMatt Jan 31, 2019
f5f6f8d
Rename left over values from different branch
JoeMatt Jan 31, 2019
e86be14
test: Add coding / decoding tests to DynamicNodeEncoding
JoeMatt Jan 31, 2019
5e94557
Convrted BooksTest to DynamicNodeEncoding, tests string equality
JoeMatt Jan 31, 2019
39b5999
Swiftfomat corrections
JoeMatt Jan 31, 2019
f5a8578
Add test coverage for String+Extensions
JoeMatt Jan 31, 2019
a110b83
Fix lowercasingFirstLetter was capitalized
JoeMatt Feb 6, 2019
f60bb38
Apply SwiftFormat fix to UnkeyedDecodingContainer
MaxDesiatov Feb 6, 2019
110a66b
Add isEmpty property to KeyedStorage
MaxDesiatov Feb 6, 2019
2061b34
Merge branch 'master' into feature/dynamicNodeEncoding
MaxDesiatov Feb 6, 2019
d29ce8f
Remove redundant extension of DynamicNodeEncoding
MaxDesiatov Feb 9, 2019
32f58ee
Update DynamicNodeEncoding extensions, fix test
MaxDesiatov Feb 9, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix lowercasingFirstLetter was capitalized
  • Loading branch information
JoeMatt committed Feb 6, 2019
commit a110b83548c7b0f300a3ca2be7be9e4799bbc29a
4 changes: 2 additions & 2 deletions Sources/XMLCoder/Auxiliaries/String+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ extension StringProtocol {

func lowercasingFirstLetter() -> Self {
// avoid lowercasing single letters (I), or capitalized multiples (AThing ! to aThing, leave as AThing)
guard count > 1, !(String(prefix(2)) == prefix(2).uppercased()) else {
guard count > 1, !(String(prefix(2)) == prefix(2).lowercased()) else {
return self
}
return Self(prefix(1).lowercased() + dropFirst())!
}

mutating func lowercaseFirstLetter() {
self = capitalizingFirstLetter()
self = lowercasingFirstLetter()
}
}