View Single Post
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 08-20-2021 , 10:38   Re: [TUT] SourcePawn Scripting - Tips, Basics to Advanced
Reply With Quote #50

Quote:
Originally Posted by little_froy View Post
strcmp() provides less readable and worse compatibility compared to StrContains()
Judging by the context of how "strcmp" is referenced in the main post, I would assume that you think "StrContains" is more "readable" and has better "compatibility" when it comes to comparing two strings, which is completely false and irrelevant to the purpose of "strcmp"/"StrEqual". The "StrContains" function checks if a string contains a substring, whereas "strcmp"/"StrEqual" compares two strings to determine if they are equal. Just because a string may contain a substring that starts at index 0, doesn't mean that the string is equal to the substring.
__________________
Psyk0tik is offline