strcmp0

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

int
strcmp0
(
string str1 = null
,
string str2 = null
)

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.