RTrim(Str: String): String;
RTrim(Str: string): string;
Str. String.
The RTrim method returns a string with removed spaces at the string end.
To remove spaces at the beginning of the string, use the IModelling.LTrim method, to remove spaces at the beginning and end of the string, use the IModelling.Trim method.
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.RTrim("Calculator ");
Debug.WriteLine("RTrim(""" + "Calculator " + """" + ") = " + res);
End Sub UserProc;
After executing the example the console window displays the Calculator string with removed spaces at the end of the string.
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.RTrim("Calculator ");
System.Diagnostics.Debug.WriteLine("RTrim(""" + "Calculator " + """" + ") = " + res);
End Sub;
Expression:
RTrim("Calculator ")
Result: Calculator.
Expression 2:
RTrim(" Calculator ")
Result: Calculator.
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: