Skip to main content
1 of 2

How do I alphabetically compare two strings

Is there a standard way to compare two strings in vim so that I can quickly determine which string is sorted before the other.

Something like

strcmp(str1, str2) 

to return 0 if str1 == str2, 1 if str1 > str2 and -1 if str1 < str2