A photographer has a collection of digital pictures, each using the same file-naming format: a date tag, followed by a description, followed by the file extension ".jpg". The photographer wants to write a code segment to extract the description from each file name, as shown in the following table.
Original File NameExtracted Description2016-05-22-Andrews-Graduation.jpgAndrews-Graduation2016-07-04-Fireworks.jpgFireworks2017-10-18-Grandmas-Birthday.jpgGrandmas-Birthday
The photographer has the following procedures available.
Procedure CallExplanationTrimLeft (str, n)Returns a copy of the string str with the n leftmost characters removed. For example, TrimLeft ("keyboard", 3) returns "board".TrimRight (str, n)Returns a copy of the string str with the n rightmost characters removed. For example, TrimRight ("keyboard", 3) returns "keybo".
Let an original file name be stored in the string variable original. Which of the following statements will correctly extract the description and store it in the string variable descr ?
-descr ← TrimLeft (TrimRight (original, 4), 11)
-descr ← TrimLeft (TrimRight (original, 11), 4)
-descr ← TrimRight (TrimLeft (original, 11), 4)