I have a text like this:
Insanely good Insanely good music. Kanye West is GOAT. The sky is blue.
I want a function that whatever is the first sequence of a string, remove it if it's repeated.
In the case above, it would be mutated into:
Insanely good music. Kanye West is GOAT. The sky is blue.
I only want to remove the first repetition, not all.
I remember that in stringr
or in stringi
there is a function that does exactly this, but I do not remember which one.