Question: Write a strtrim function using the provided interface that trims the whitespace off the front and back of any null terminated cstring. Must work on

 Write a strtrim function using the provided interface that trims the

Write a strtrim function using the provided interface that trims the whitespace off the front and back of any null terminated cstring. Must work on all strings including but not limited to nullptr, empty strings, and lank strings. The function must work with heap allocated strings. The return must be identical to the input parameter. Be sure your function passes the provided test cases Your strtrim function may only use methods found in the following headers: #include \ #include \ You may use the cstring header, but only if you pay very close attention. nullptr, "Hello, world!", "whitespace", "whitespace right "whitespace left" " \t tab \t ", " r crlf ", " The quick brownInltvrlffox jumps over the lazy dog. \b ", "Here comes the rain again", "Falling on my head like a memory", "Falling on my head like a new emotion", "I want to walk in the open wind", "I want to talk like lovers do" "I want to dive into your ocean", "Is it raining with you" 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!