TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | May 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Andrey Volobuev.
Library containing extension to the sequence protocol where element is conforms to the CustomStringConvertible protocol (could be an optional). Also contains a helper structure with the convinients methods to convert sequences
Classic example is resolving correct string with a punctuation from a firstname, middlename and lastname in the case when it is possible for each element to be empty or nil.
let formatted = SequenceConverter.middleSpaceFormat("Ivanov", "Ivan", "Ivanovich" )
// "Ivanov Ivan Ivanovich"
let formatted = SequenceConverter.middleSpaceFormat("Ivanov", "Ivan" )
// "Ivanov Ivan"
// Custom separators
["1", "", nil, "", "4", "5"].toStringWithSeparators(before: "<-", between: "|", after: "->")
//"<-1|4|5->"
If you have any questions, drop me an email [email protected].