Sedang Disiapkan

Algoritma Job by jv16

Your job is to write a function:

Function AnalyzeData(const Data : String; Var List : TStringList) : Boolean;

The function takes as an input the Data string which will contain 0..N number of filenames (e.g. '@c:\foobar\foo\[url removed, login to view] -run' or '%window%\[url removed, login to view] /silent') and directory paths (e.g. 'path=%windir%\fonts\', '@"c:\foobar\" -foo'). The input string can contain any random characters with the filenames and directory paths.

The function must return True if one or more valid looking filenames or directory paths was detected from the input string. In such case, these are added to the given List. If no valid looking filenames or paths were found, then List is not modified and False is returned.

The function can use CommonFileExts : TStringList; which contains a sorted, duplicate-free list of most common file extensions. For a sample, see the attached Tester program. The attached program contains my implementation of AnalyzeData (albeit with a bit different parameter list). Your job is to create your own implementation and make it faster and more accurate than my implementation. By accuracy I mean the ability to extract the desired filename and directory path data from the given input strings.

Note: If the input string contains environmental variables, such as "%windir%", these must be expanded. The attached Tester app contains ExpandEnvString() which you will use for this.

You can also implement the function as a member of a class, e.g. TFileNameExtractor.

Kemahiran: Algoritma

Lihat lebih lanjut: tfilenameextractor, extract number from string, common string, app tester job, app tester, class log found, run custom app, extract filename, use extract function, random string, extract app data, 2013, sample project tester, create silent exe, extract data app, desired project, directory free list, app extract data, extract data exe, data takes project, custom window, class extract, free sample project, foobar, extract characters file

Tentang Majikan:
( 591 ulasan ) Turku, Thailand

ID Projek: #4087654

Dianugerahkan kepada:


Hired by the Employer

$200 USD dalam 5 hari
(2 Ulasan)