This documentation is archived and is not being maintained.
strCmp Function [AX 2012]
Updated: December 10, 2009
Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
Compares two text strings.
int strCmp(str text1, str text2)
|
Parameter
|
Description
|
|
text1
|
The first string.
|
|
text2
|
The second string.
|
0 if the two strings are identical, 1 if the first string sorts earlier, or -1 if the second string sorts earlier.
The comparison performed by this method is case-sensitive.
-
print strCmp("abc", "abc"); //Returns the value 0.
-
print strCmp("abc", "ABC"); //Returns the value 1.
-
print strCmp("aaa", "bbb"); //Returns the value -1.
-
print strCmp("ccc", "bbb"); //Returns the value 1.
Announcements: To see known issues and recent fixes, use
Issue search in
Microsoft Dynamics Lifecycle Services (LCS).