You are not logged in.
Hi Denis,
do we have already an InStr() PascalScript function?
WideInStr(input, search): Boolean ;
If( WideInStr(FileName, 'example')  ) Then
     FileName := 'text' + FileName;
Or else, would you please put that on your To-Do List ![]()
Always trying to find some work for you ![]()
 
Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)
Offline
Hi Stefan,
I think the use cases of InStr / WideInStr are already covered by Pos, PosEx, WidePos, WidePosEx, WideTextPos, WideTextPosEx.
I am reluctant to adding a too many similar functions to Pascal Script.
Offline
Thanks for the feedback. you are right, I missed that and try to remember.
Examples:
VBScript InStr
        ShowMessage(   IntToStr( WidePos('R',FileName) )  );
        if( WidePos('R',FileName) >0 )then ShowMessage(FileName);
                //Or:
        if( Pos('Otto',FileName) >0 )then
        begin
            ShowMessage(FileName)
            FileName := '__' + FileName
        end;    
VBScript InStrRev()
        strReversed := WideReverseString(FileName);                     //Return reversed string.
        intPosRev   := WidePos('Otto', strReversed);
        ShowMessage(  IntToStr(intPosRev) );
        //Or:
        intPosRev   := WidePos('Otto', WideReverseString(FileName));
        ShowMessage(   IntToStr(  WidePos('o', WideReverseString(FileName)) ) );
THX ![]()
Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)
Offline