ngsub {chatAI4R}R Documentation

ngsub

Description

Remove extra spaces and newline characters from text.

Usage

ngsub(text)

Arguments

text

The input text from which extra spaces and newline characters need to be removed.

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.

Value

Returns the modified text as a character string.

Author(s)

Satoshi Kume

Examples

## Not run: 
ngsub("This is  a text \n with  extra   spaces.")

## End(Not run)

[Package chatAI4R version 0.2.10 Index]