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. [allow-none]

str2 string

another C string or NULL. [allow-none]

Return Value

Type: int

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

Meta