String.Min_

Syntax

Min_(A: String; B: String): String;

Parameters

A. The first string to compare.

B. The second string to compare.

Description

The Min_ method compares two strings character-by-character and returns the minimum one of them.

Comments

Strings are compared by value of the ASCII case-sensitive encoding. For example:

The method returns Null if at least one of parameters is equal to Null.

Example

Sub UserProc;
Var
    s1, s2, s3: String;
Begin
    s1 := 
"Apple";
    s2 := 
"Banana";
    
// Get minimum of two strings
    s3 := String.Min_(s1, s2);
    Debug.WriteLine(
"Min_(""" + s1 + """" + ", """ + s2 + """" + ") = " + s3);
End Sub UserProc;

After executing the example the minimum string of the Apple and Banana strings is displayed in the console window.

See also:

String