assumeCompare Function

public function assumeCompare(firstString, secondString)

Compare two strings with the assumption that both strings are valid decimal integers.

This function ignores leading and trailing whitespaces.

This function evaluates both, negative and positive values. This function may produce unwanted result if the previous is not met or if the number formatting is incorrect.

This function considers empty strings as smallest. This function disregards leading zeroes. This function considers a string with only a '-' or a '+' sign as 0.

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.


Type IntentOptional AttributesName
character(len=*), intent(in) :: firstString

A string to be compared to the string secondString.

character(len=*), intent(in) :: secondString

A string to be compared to the string firstString.

Return Value integer(kind=k_int32)