Str.strcmp0

Compares str1 and str2 like strcmp(). Handles NULL gracefully by sorting it before non-NULL strings. Comparing two NULL pointers returns 0.

struct Str
static
int
strcmp0
(
string str1
,
string str2
)

Parameters

str1 string

a C string or NULL

str2 string

another C string or NULL

Return Value

Type: int

an integer less than, equal to, or greater than zero, if str1 is <, == or > than str2.

Meta

Since

2.16