Remove extra spaces and newline characters from text.
Usage
ngsub(text)
Value
Returns the modified text as a character string.
Arguments
text
The input text from which extra spaces and newline characters need to be removed.
Author
Satoshi Kume
Details
Remove Extra Spaces and Newline Characters
This function removes extra spaces and newline characters from the given text.
It replaces sequences of multiple spaces with a single space and removes newline characters followed by a space.