Modify the find command to accept prefixes n/, p, e/, t/, just like the cadd command. The find command finds clients whose details match one or more of the prefixes. Found clients are displayed based on the number of prefixes matched.
The k/ prefix matches in all fields, and can accept duplicates. Duplicate k/ arguments match separately (i.e. k/bernice k/yu will match "bernice" and "yu", whereas k/bernice yu will match "bernice yu").
For example, if the app currently stores clients
John Doe; Phone: 98765432; Email: johnd@example.com; Tags: [owesMoney][friends]
John Tan; Phone: 00800912; Email: johnt@example.com; Tags: [colleagues][friends]
Modify the
find
command to accept prefixesn/
,p
,e/
,t/
, just like thecadd
command. Thefind
command finds clients whose details match one or more of the prefixes. Found clients are displayed based on the number of prefixes matched.The
k/
prefix matches in all fields, and can accept duplicates. Duplicatek/
arguments match separately (i.e.k/bernice k/yu
will match "bernice" and "yu", whereask/bernice yu
will match "bernice yu").For example, if the app currently stores clients
John Doe; Phone: 98765432; Email: johnd@example.com; Tags: [owesMoney][friends]
John Tan; Phone: 00800912; Email: johnt@example.com; Tags: [colleagues][friends]
Bernice Yu; Phone: 12345789; Email: berniceyu@example.com; Tags: [colleagues][friends]
the command
find n/John p/00800912
will result in:John Doe; Phone: 98765432; Email: johnd@example.com; Tags: [owesMoney][friends]
John Tan; Phone: 00800912; Email: johnt@example.com; Tags: [colleagues][friends]