.Modelica.Utilities.Strings.compare

Information

Syntax

result = Strings.compare(string1, string2);
result = Strings.compare(string1, string2, caseSensitive=true);

Description

Compares two strings. If the optional argument caseSensitive=false, upper case letters are treated as if they would be lower case letters. The result of the comparison is returned as:

result = Modelica.Utilities.Types.Compare.Less     // string1 < string2
       = Modelica.Utilities.Types.Compare.Equal    // string1 = string2
       = Modelica.Utilities.Types.Compare.Greater  // string1 > string2

Comparison is with regards to lexicographical order, e.g., "a" < "b";

Interface

pure function compare
  extends Modelica.Icons.Function;
  input String string1;
  input String string2;
  input Boolean caseSensitive = true "= false, if case of letters is ignored";
  output Modelica.Utilities.Types.Compare result "Result of comparison";
end compare;

Generated at 2020-06-05T21:39:08Z by OpenModelica 1.16.0~dev-442-g2e5bc9f