strcmp0
fn
int strcmp0(string str1 = null, string str2 = null)Compares str1 and str2 like strcmp(). Handles null gracefully by sorting it before non-null strings. Comparing two null pointers returns 0.
Parameters
str1 | a C string or null |
str2 | another C string or null |
Returns
an integer less than, equal to, or greater than zero, if str1 is <, == or > than str2.