IModelling.Left

Fore Syntax

Left(Str: String; Count: Integer): String;

Fore.NET Syntax

Left(Str: string; Count: integer): string;

Parameters

Str. String.

Count. The number of characters from the left string edge that must be obtained.

Description

The Left method returns the specified number of characters from the left string edge.

Comments

To get characters from the right string edge, use the IModelling.Right method.

Fore Example

To execute the example, add a link to the Ms system assembly.

Sub UserProc;
Var
    Func: Modelling;
    res: String;
Begin
    Func := New Modelling.Create;
    res := Func.Left("Calculator"4);
    Debug.WriteLine("Left(""" + "Calculator" + """" + ", 4) = " + res);
End Sub UserProc;

After executing the example the console window displays the four first characters from the left edge of the Calculator string.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Ms;

Public Shared Sub Main(Params: StartParams);
Var
    Func: IModelling;
    res: String;
Begin
    Func := New Modelling.Create(;
    res := Func.Left("Calculator"4);
    System.Diagnostics.Debug.WriteLine("Left(""" + "Calculator" + """" + ", 4) = " + res);
End Sub;

Example of Use in Expressions

Expression:

Left("Calculator", 4)

Result: Calc.

Expression 2:

Left("Calculator", 2)

Result: Ca.

Use: expressions can be used in model formulas of modeling container, in formulas of time series database calculated series, in formulas of the modeling container that is a child one for time series database in formula editor.

See also:

IModelling | Time Series Database: Calculator| Modeling Container: Editing Regressor or Formula | Expression Editor

See also:

IModelling