Help | someone can give stock..
#1

Hello !

in my past i see the stock strequal its like strcmp
i tried to search him but i dont found

some one can give me this stock?
Reply
#2

pawn Код:
stock bool:strequals(const str1[], const str2[], bool:ignorecase = false) {
    new
        c1 = (str1[0] > 255) ? str1{0} : str1[0],
        c2 = (str2[0] > 255) ? str2{0} : str2[0]
    ;
   
    if (!c1 != !c2)
        return false;
   
    return !strcmp(str1, str2, ignorecase);
}
USAGE:
pawn Код:
if (strequals("orange", "apple")) // false
if (strequals("", "apple")) // false
if (strequals("apple", "apple")) // true
if (strequals(!"apple", "apple")) // true
if (strequals(!"apple", "Apple", .ignorecase = true)) // true
Reply
#3

THNX Man
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)