Computer Science, asked by lakshita8363, 1 year ago

difference between find and replace in computer science​

Answers

Answered by shauryasrinet2p83lee
0

PLZZ check the attachment for answer.. Plz mark brainliest

Attachments:
Answered by mahak45
0
FIND is non-destructive. It just finds the target string and point a big arrow at it to let you know where it is.

REPLACE actually alters the text. It expunges the ‘found’ text and puts something new in its place.

Sometimes a replace is reversible. e.g. if you edit the text of Shakespeare’s Hamlet and do a

 FIND “HAMLET” REPLACE “HEDGEHOG”

then you can do a

 FIND “HEDGEHOG” REPLACE “HAMLET”

and get back the original. But that only works because the original play does not contain the word “Hedgehog”. If you do


 FIND “HAMLET” REPLACE “OPHELIA”

then you can’t undo it. A subsequent

 FIND “OPHELIA” REPLACE “HAMLET”

will not only restore the original occurrences of HAMLET, but it will also mess-up the original occurrences of OPHELIA.

[Note: There are systems that allow UNDO functions - but they work by taking a backup copy of the text before you mess with it - and offering the chance to restore the backup on demand.]

Similar questions