The problem I am left with is that I need to split a string into substrings and determine the character location of the 30th occurance of "\n" string.
I have a string that has "\n" within it and I am looking for a way to know how many characters the string has from 0 to the 30th occurance of "\n" within the main string
I have considered a string.split or indexOf but can't wrap my head around how to determine the character location of the 30th occurance part.
Any ideas?
I have a string that has "\n" within it and I am looking for a way to know how many characters the string has from 0 to the 30th occurance of "\n" within the main string
I have considered a string.split or indexOf but can't wrap my head around how to determine the character location of the 30th occurance part.
Any ideas?
Comment