Preforms a newest-to-oldest search of log entries for an entry matching a given prefix.
This search starts with the most recent entry in the log and compares each entry to determine if the query is a prefix of the log entry. Upon reaching a match, a pointer to that element is returned. If no match is found, a NULL pointer is returned.
You may assume that:
- All pointers will be valid, non-NULL pointer.
- Parameters:
-
| l | Pointer to the log data structure. |
| prefix | The prefix to test each entry in the log for a match. |
- Returns:
- The newest entry in the log whose string matches the specified prefix. If no strings has the specified prefix, NULL is returned.