/*
###########################################################################
This function removes all external and internal white-space from within
a given text string by using PERL regular expressions operators.
All multiple spaces are replaced by single spaces and all leading and
trailing spaces are removed as well as carriage returns and line feeds.
-------
EXAMPLE
The text string argument:
" The quick brownfox jumped over the lazy dog. "
Would return the string:
"The quick brown fox jumped over the lazy dog."
All leading and trailing spaces are removed and any extra internal spaces
are replaced by single spaces to normalize the spacing between the words.
ERRORS:
No special error checking is done.
NO DEPENDENCIES
###########################################################################
*/
function Strip_Whitespace ($TextString)
{
return PReg_Replace("/\s+/", " ", trim($TextString));
} // End of Strip_Whitespace (...)