If you do
print(string.find("hello there. I say hello. hello I say","hello"))
it will return the same thing as
Is there a function that could return a table of the position of all the different "hello"s?
What are you attempting to achieve?
The end goal is colorful syntax highlighting ingame
What is the issue?
string.find only shows the first piece it finds, not all the pieces.
Solutions I’ve thought of:
I could loop through and replace each print temporarily with some strange unused character and then change it all back at the end, but that seems like a lot of work