Hi!
How can I check how many occurrences of a word I have in a string stored in a variable?
I have a plugin that can store a free input txt in a variable.
I'm using this script (in Conditional Branches) to check what i wrote ($gameVariables.value(N).toLowerCase().includes("word")).
But how can I check how many time "word" recurs in the string?
Any ideas?
Thanks^^
How can I check how many occurrences of a word I have in a string stored in a variable?
I have a plugin that can store a free input txt in a variable.
I'm using this script (in Conditional Branches) to check what i wrote ($gameVariables.value(N).toLowerCase().includes("word")).
But how can I check how many time "word" recurs in the string?
Any ideas?
Thanks^^