searchInFile
Nessuna licenza
SEARCHINFILE searches for a binary or string pattern in a file
OFFSET = SEARCHINFILE(FILE, PATTERN)
OFFSET = SEARCHINFILE(FILE, PATTERN, BLOCKSIZE)
The pattern may be a string or a line vector.
The blocksize is the maximum size in bytes which will be in memory while searching. If no blocksize is given then 10000 is assumed. The advantage of using a blockwise search is that you can search in very big files without using much memory.
The offset is the total offset in bytes to the first place of finding. If nothing was found then OFFSET = []
Example:
offset = searchinfile('bigfile.txt', 'searchstring', 20000);
Reads the file in 20000 Byte steps and searches for the searchstring. If it was found, the total offset to the beginning of the searchstring will be returned.
Cita come
Stefan Eireiner (2024). searchInFile (https://www.mathworks.com/matlabcentral/fileexchange/10717-searchinfile), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Compatibilità della piattaforma
Windows macOS LinuxCategorie
Tag
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
Versione | Pubblicato | Note della release | |
---|---|---|---|
1.0.0.0 |