Str.strcmp0

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

class 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

-1, 0 or 1, if str1 is <, == or > than str2.

Meta