4 ms·
Even if it's usually a terrible idea, I quite like how formal objective-c and swift make doing this with extensions/categories. Subclassing would probably be ea
by extraduder_ire 3y ago
Even if it's usually a terrible idea, I quite like how formal objective-c and swift make doing this with extensions/categories. Subclassing would probably be easier to read, but extensions sure beat the hell out of whatever hacks someone would come up with to add a method to the String class.