Locating Words at Arbitrary Positions
Learn how to locate words at an arbitrary position in a string.
We are going to continue our discussion surrounding lines and words. Since so much of our work and lives revolve around information presented using these two constructs, it makes sense for us to linger on them for a little longer. We created several helper methods that enable us to perform various word and line-related tasks, such as:
- Resolving the line and column numbers of arbitrary positions
- Counting word occurrences
- Splitting strings into words
Get hands-on with 1200+ tech skills courses.