Enumerating and Counting Text Components in Swift

No need to reinvent the wheel when what we need is just there!

Gabriel Theodoropoulos

--

Photo by Pixabay from Pexels

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…

--

--

Gabriel Theodoropoulos

An iOS & macOS app maker writing code in Swift. Author of countless programming tutorials. Content creator. https://serialcoder.dev