Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Removing one part of a string?

Asked by 3 years ago

I am wondering how I remove one part of a string, in the instance that the string consists of the same two words.

string.gsub(Value, Pet, "")

If the value consists of two of the same words, they both get replaced by "", but is there a way to use gsub and have only one of those words get deleted, or is there another way to manipulate the string?

Any help would be greatly appreciated!

1 answer

Log in to vote
0
Answered by
zomspi 541 Moderation Voter
3 years ago

Maybe try to use Split()?

Ad

Answer this question