StringReplace

edited 4:40AM in FastScript
Hi,
Does have anyway to use stringreplace function in fastscript ?

I try to use "Addmethod" but I don't know how to use it, can you teach me.

Regards,
Alex

Comments

  • edited 4:40AM
    you must read help file ;)
    this method work for instance:
    procedure MyCallMethod(Instance: TObject; ClassType: TClass;
          const MethodName: String; var Params: Variant): Variant; 
    begin
    ........
    if MethodName='STRINGREPLACE' then//MethodName return name of method in upeercase, independently from that you write this method in AddMEthod
       Result:=.............;//you can use Params
    .......
    end;
    
    procedure MyProc;
    begin
    fsScript.AddMethod('function StringReplace(......): string', MyCallMethod);
    end;
    
    i'm sorry, if i've very bad english ;)

Leave a Comment