|
Trim String
|
Trim String - a simple string operation assignment
A function trim() shall remove all leading and trailing whitespace characters. Whitespace characters are space (' ' ), tabulator ('\t'), new line ('
'), and line feed ('\r') charaters.
The function should be implemented in two variants: One variant copies a part of a string into another. The other variant manipulates the original string without creating a copy.
If we consider the string
" This string can be trimmed . "
the trimmed version of it would be
"This string can be trimmed ."
trim() such that all unit tests pass.trim_cpy() such that all unit tests pass.strcpy function for this purpose.stdout.stdout if the number of actual command line arguments does not match the number of expected arguments.
1.8.18