[HELP] Help with contain..
What is != -1 after
Code:
containi(blabla1,"blabla2") != -1Code:
containi(blabla1,"blabla2") |
Re: [HELP] Help with contain..
From the string.inc const ( in amxmodx.inc )
/* Checks if source contains string. On success function * returns position in source, on failure returns -1. */ native contain(const source[],const string[]); Means that: new A[10] = "BlahBlah" new B[10] = "LAHLAH" //contain(A, B) will return -1 // So if -1 != -1 if(contain(A, B)) != -1) { //Something will happen if A and B match. } Please correct me if I'm wrong ^_^ |
Re: [HELP] Help with contain..
Thanks. If, i don't put != -1, what's happening? Will return with what i want?
Like: if(contain(A, B)) { //Something will happen if A and B match. } |
Re: [HELP] Help with contain..
Quote:
-1 means there is NO MATCH. Other than this (higher then -1) means it has a match. |
Re: [HELP] Help with contain..
Thanks.
|
| All times are GMT -4. The time now is 03:05. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.