strings.c: replace copy_spaces, copy_chars with equivalent memset.
Merge pull request #1635 from danthedeckie/master

replace copy_spaces and copy_chars functions with equivalent memset.