Forum

> > CS2D > Scripts > Removing latters from the string
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Removing latters from the string

7 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Removing latters from the string

Infinite Rain
Reviewer Off Offline

Zitieren
Guys how can I remove words from string?

Example:
1
2
3
4
5
6
7
function remove(stringg, word)
	stringg = string.lower(stringg)
	word = string.lower(word)
	if string.find(stringg, word) ~= nil then
		remove_word(stringg, word)
	end
end

Please reply
Thanks

alt Re: Removing latters from the string

Apache uwu
User Off Offline

Zitieren
You will need to loop this so it removes all of them...

1
2
3
4
5
6
7
8
9
function remove(stringg, word)
	while string.find(stringg,word)~=nil do
    		stringg = string.lower(stringg)
     		word = string.lower(word)
    		 if string.find(stringg, word) ~= nil then
          		remove_word(stringg, word)
    		 end
	end
end

"Dollororem ipsum quia dolor sit amet"
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht