ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / External file functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Finds a character string or a buffer in a file opened by fOpen.
Example
MonBuffer is Buffer
IDFichier is int

MonBuffer = fLoadBuffer("C:\tmp\Page1.html")
IDFichier = fOpen("C:\test\MonFichier.html")
nPosition = fFind(IDFichier, MonBuffer)

IF nPosition <> -1 THEN
	Info("Le contenu de Page1 a été trouvé dans le fichier à la position " + nPosition)
END
MonBuffer is Buffer
MonFichierHtml is DiskFile
nPosition is int

MonBuffer = fLoadBuffer("C:\tmp\Page1.html")
MonFichierHtml = fOpen("C:\test\MonFichier.html")
nPosition = fFind(MonFichierHtml, MonBuffer)

IF nPosition <> -1 THEN
	Info("Le contenu de Page1 a été trouvé dans MonFichierHtml à la position " + nPosition)
END
Syntax
<Result> = fFind(<File used> , <Search element> [, <Start position>])
<Result>: Integer
  • Position of the sought element in the file.
  • -1 if no element corresponds to the search.
<File used>: Integer or DiskFile variable
<Search element>: Buffer or character string
Buffer or character string whose content must be found in the text file.
<Start position>: Optional integer
Start position for the search. By default, the search is performed from the beginning of the file.
Business / UI classification: Business Logic
Component: wd300std.dll
Minimum version required
  • Version 18
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help