Built-in Units

EXPRESSIONS

Modern Pascal provides built-in support for most common Regular Expressions by introducing the TRegExpr object with this unit. This unit also introduces a basic inline calculator method and a more advanced calculator that supports variables and values.

Globals



Functions

Calculator(Expression:String;args:TExtendedArray;variables:TStringList):Extended
Calculator(Expression:String;variables:TStringList):Extended
Calculator(Expression:String):Extended

Procedures



TRegExpr

.Init()
.GetExpression:String
.SetExpression(V:String)
.Exec(Const AStr:String):Boolean
.ExecNext:Boolean
.ExecPos(Offset:PtrInt):Boolean
.GetInputString:String
.SetInputString(V:String)
.Substitue(AStr:String):String
.Split(AStr:String;Pieces:TStrings)
.Replace(AStr:String;Const RepStr:Strnig;UseSubstitution:Boolean):String
.GetSubExprMatchCount:Longint
.GetMatchPos:PtrInt
.GetMatchLen:PtrInt
.GetMatch:String
.Free()