public pure function decInt32OrSmaller(firstString, secondString) result(int32Out)
Compare two strings bases on the content of the strings reference to int32 values. If the strings are valid signed decimal integer strings that can be parsed to int32 values then they will be compared base on their int32 values. Otherwise, the strings will be compared base on the priority ranking order below.
This function return an int32 value of 1 if the firstString
is larger than the secondString
, 0 if they are both equal, or -1 if the firstString
is smaller than the secondString
.
Priority order ranking: (lo - hi)
0 - invalid format
1 - underflow
2 - overflow
3 - empty string (0 length or empty space)
4 - valid int32
Arguments
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | firstString | A string to be compared to the string | ||
character(len=*), | intent(in) | :: | secondString | A string to be compared to the string |