Products Downloads


French version


 

This function compares two alphanumeric strings and returns "true" if the first string is lower than or equal to the second ("false" if not).

Unlike lexicographic comparison which compares the coding value of each character, this comparison uses a collation which enables two character strings to be compared according to a given language.


Parameters

String

stringVal1

Alphanumeric string to compare

Mandatory

String

stringVal2

Alphanumeric string to compare

Mandatory

Hash

collatorInfos

Definition of collation information. This object can have the following attributes:

  • "locale": string in IETF BCP 47 format identifying a sort locale,
  • "strength": string representing the strength of the collation to determine the level of difference considered as significant in the comparisons. Five values are provided: "identical", "primary", "secondary", "tertiary" and "quaternary".
  • "decomposition": string representing the collation decomposition mode. It determines the processing of Unicode combining characters. Setting the decomposition mode enables the user to choose between a quicker and fuller classification behavior. Three values are provided: "no_decomposition", "canonical_decomposition" and "full_decomposition"

Optional.

If this object is not provided, the locale taken for the comparison is that entered for template execution ("strength" and "decomposition" attributes will have a default value which depends on the locale).

 


For example

foo <= bar: ${ hardisCore.isLocaleBasedLteString("foo", "bar", {"strength":"primary"})}