strcmp()
Compares two texts.
Syntax
strcmp(a, b)
Description
Returns 0 if equal (comparing with == is WRONG). 0 = equal.
Example
Loading editor…
Expected output
0
When to use?
Text equality check.
Common mistakes
- ⚠️ Do not compare texts with ==; use strcmp(a,b)==0.