Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- A common task is to remove spaces from the beginning and end of a string. This function is often called trim().
- Write a function that removes the space characters from the beginning and end of a string given as a parameter (leaving the rest). For example, if the input is " hello, what's up? ", then the new string is "hello, what's up?" "hello" should be "hello". The function takes two parameters: a source array (this contains the string with the space) and a destination array (this contains the string without the space).
- Should this function get the size of the array? Why?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement