-
Notifications
You must be signed in to change notification settings - Fork 51
Manual:DIL Manual strcmp()
iamnove edited this page Jan 18, 2023
·
51 revisions
Function: integer strcmp( s1:string, s2:string) ;
s1 first string s2 second string
returns -1 if s1 < s2 0 if s1 = s2 1 if s1 > s2
This allows you to compare strings with case sensitivity in place. If you don't care about the case of the string use the normal '==' '>', '<', '<=', '>=', symbols. example: ---~---~---~---~---~---~---~---~---
if (strcmp("I Care about Capitals",s2)==0)) { sendtext ("You care I can see.&n",self); quit; }
---~---~---~---~---~---~---~---~---