Advertisement
Guest User

Untitled

a guest
Sep 28th, 2023
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. A common task is to remove spaces from the beginning and end of a string. This function is often called trim().
  2.  
  3. 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).
  4.  
  5. Should this function get the size of the array? Why?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement