0
Inspired by Ruby's String.count-method I wrote a similar Swift-method myself as an extension to the String-class. Then I had the idea to use a second parameter with which you can control if the search shall be done case-sensitive or case-inventive. Here's my code: extension String { func coun...