Enumerating and Counting Text Components in Swift
No need to reinvent the wheel when what we need is just there!
It’s sometimes necessary either to enumerate, or to just count various components of a text in our apps. Examples of that would be to find the total number of characters, words, paragraphs, lines, and more in the entire or part of the text. Quite probably the first thought…