SRL Archive - OSR Help

Stripping a string


Sin

2013-03-19 17:44:02

Hey guys, say my string contains 'partyhats'.
What would i do to check if the string contains the word 'partyhat'?
I know about Pos(); but I dont know how to use it.

Kevin

2013-03-19 17:45:13

if(pos('partyhat', 'partyhats') <> 0)then

Nebula

2013-03-19 17:45:32

if pos() > 0 then
StringContainsPartyhat := true;

rj

2013-03-19 17:46:32

I only know how to do this in java and I'm basicly retarded in java.. its something like

ContaintsTextIgnoreCase('jdgjdfpartyhatfjksj')
Idk you can try something like that

Sin

2013-03-19 17:49:48

From: nivek1989
if(pos('partyhat', 'partyhats') <> 0)then


Thanks +rep

/thread.

litoris

2013-03-19 18:00:08

You should also check out regex, it has many advanced text related functions.