// library: file: goto: next: file: name: given <description></description> <version control></version control> <version>1.0.0.0.10</version>
// <version control></version control> (filenamemacro=gotofing.s) [<Program>] [<Research>] [kn, ri, we, // 04-01-2023 11:22:34]
INTEGER PROC FNFileGotoNextFileNameGivenB( STRING searchS )
INTEGER B = FALSE
INTEGER foundB = FALSE
INTEGER startB = FALSE
STRING fileNameStartS[255] = CurrFilename()
STRING fileNameS[255] = ""
REPEAT
NextFile()
fileNameS = CurrFilename()
foundB = StrFind( searchS, fileNameS, "i" )
IF foundB
B = TRUE
ENDIF
startB = EquiStr( fileNameS, fileNameStartS )
UNTIL ( foundB ) OR ( startB )
IF ( ( startB ) AND ( NOT ( B ) ) )
Warn( "Filename with", ":", " ", searchS, " ", "in the filename was not found in the TSE file ring" )
ENDIF
RETURN( B )
END
PROC Main()
STRING s1[255] = GetHistoryStr( _EDIT_HISTORY_, 1 ) // change this
IF ( NOT ( Ask( "file: goto: next: file: name: given: searchS = ", s1, _EDIT_HISTORY_ ) ) AND ( Length( s1 ) > 0 ) ) RETURN() ENDIF
Message( FNFileGotoNextFileNameGivenB( s1 ) ) // gives e.g. TRUE
END