@@ -777,19 +777,19 @@ public override void ToString(StringBuilder stringBuilder, bool addBrackets)
777777 }
778778 }
779779
780- internal class Function_REMOVESTART : Function_N
780+ internal class Function_REMOVESTART : Function_3
781781 {
782- public Function_REMOVESTART ( FunctionBase [ ] funcs ) : base ( funcs )
782+ public Function_REMOVESTART ( FunctionBase func1 , FunctionBase func2 , FunctionBase func3 ) : base ( func1 , func2 , func3 )
783783 {
784784 }
785785
786786 public override Operand Calculate ( AlgorithmEngine work )
787787 {
788- var args1 = funcs [ 0 ] . Calculate ( work ) ; if ( args1 . Type != OperandType . TEXT ) { args1 = args1 . ToText ( "Function '{0}' parameter {1} is error!" , "RemoveStart" , 1 ) ; if ( args1 . IsError ) { return args1 ; } }
789- var args2 = funcs [ 1 ] . Calculate ( work ) ; if ( args2 . Type != OperandType . TEXT ) { args2 = args2 . ToText ( "Function '{0}' parameter {1} is error!" , "RemoveStart" , 2 ) ; if ( args2 . IsError ) { return args2 ; } }
788+ var args1 = func1 . Calculate ( work ) ; if ( args1 . Type != OperandType . TEXT ) { args1 = args1 . ToText ( "Function '{0}' parameter {1} is error!" , "RemoveStart" , 1 ) ; if ( args1 . IsError ) { return args1 ; } }
789+ var args2 = func2 . Calculate ( work ) ; if ( args2 . Type != OperandType . TEXT ) { args2 = args2 . ToText ( "Function '{0}' parameter {1} is error!" , "RemoveStart" , 2 ) ; if ( args2 . IsError ) { return args2 ; } }
790790 StringComparison comparison = StringComparison . Ordinal ;
791- if ( funcs . Length == 3 ) {
792- var args3 = funcs [ 2 ] . Calculate ( work ) ; if ( args3 . Type != OperandType . BOOLEAN ) { args3 = args3 . ToBoolean ( "Function '{0}' parameter {1} is error!" , "RemoveStart" , 3 ) ; if ( args3 . IsError ) { return args3 ; } }
791+ if ( func3 != null ) {
792+ var args3 = func3 . Calculate ( work ) ; if ( args3 . Type != OperandType . BOOLEAN ) { args3 = args3 . ToBoolean ( "Function '{0}' parameter {1} is error!" , "RemoveStart" , 3 ) ; if ( args3 . IsError ) { return args3 ; } }
793793 if ( args3 . BooleanValue ) {
794794 comparison = StringComparison . OrdinalIgnoreCase ;
795795 }
@@ -806,19 +806,19 @@ public override void ToString(StringBuilder stringBuilder, bool addBrackets)
806806 }
807807 }
808808
809- internal class Function_REMOVEEND : Function_N
809+ internal class Function_REMOVEEND : Function_3
810810 {
811- public Function_REMOVEEND ( FunctionBase [ ] funcs ) : base ( funcs )
811+ public Function_REMOVEEND ( FunctionBase func1 , FunctionBase func2 , FunctionBase func3 ) : base ( func1 , func2 , func3 )
812812 {
813813 }
814814
815815 public override Operand Calculate ( AlgorithmEngine work )
816816 {
817- var args1 = funcs [ 0 ] . Calculate ( work ) ; if ( args1 . Type != OperandType . TEXT ) { args1 = args1 . ToText ( "Function '{0}' parameter {1} is error!" , "RemoveEnd" , 1 ) ; if ( args1 . IsError ) { return args1 ; } }
818- var args2 = funcs [ 1 ] . Calculate ( work ) ; if ( args2 . Type != OperandType . TEXT ) { args2 = args2 . ToText ( "Function '{0}' parameter {1} is error!" , "RemoveEnd" , 2 ) ; if ( args2 . IsError ) { return args2 ; } }
817+ var args1 = func1 . Calculate ( work ) ; if ( args1 . Type != OperandType . TEXT ) { args1 = args1 . ToText ( "Function '{0}' parameter {1} is error!" , "RemoveEnd" , 1 ) ; if ( args1 . IsError ) { return args1 ; } }
818+ var args2 = func2 . Calculate ( work ) ; if ( args2 . Type != OperandType . TEXT ) { args2 = args2 . ToText ( "Function '{0}' parameter {1} is error!" , "RemoveEnd" , 2 ) ; if ( args2 . IsError ) { return args2 ; } }
819819 StringComparison comparison = StringComparison . Ordinal ;
820- if ( funcs . Length == 3 ) {
821- var args3 = funcs [ 2 ] . Calculate ( work ) ; if ( args3 . Type != OperandType . BOOLEAN ) { args3 = args3 . ToBoolean ( "Function '{0}' parameter {1} is error!" , "RemoveEnd" , 3 ) ; if ( args3 . IsError ) { return args3 ; } }
820+ if ( func3 != null ) {
821+ var args3 = func3 . Calculate ( work ) ; if ( args3 . Type != OperandType . BOOLEAN ) { args3 = args3 . ToBoolean ( "Function '{0}' parameter {1} is error!" , "RemoveEnd" , 3 ) ; if ( args3 . IsError ) { return args3 ; } }
822822 if ( args3 . BooleanValue ) {
823823 comparison = StringComparison . OrdinalIgnoreCase ;
824824 }
0 commit comments