Strip line breaks?

#1

Stripping whitespaces (and normalizing whitespaces) are very helpful, but they do only the one of two parts, containing in the task "content cleaning".

The second task, stripping line breaks, must be done externally - copy content into code editor, remove line breaks, paste back into Excel...

Why not remove line breaks in STFE too? Or is find → CTRL+j → replace enough for all?

#2

Thanks, good feedback. I usually do substitute(text,char(10)," ") but an SeoTools function would be nice.

Do you prefer as an addition to the StripWhitespace, or as an extra argument, or as a separate function?

#3

Hmm, there are in fact four functions: strip whitespaces, normalize whitespaces, strip linebreaks, normalize linebreaks and, not to forget, combinations of both.

In order to not overload the GUI, i personally would prefer an aggregative function with options, like =CLEAN with options, working like:
=CLEAN(A2,"strip_ws","normalize_lb")

Default state, without options, =CLEAN(A2), would be the most often case - i guess it is normalizing whitespaces and stripping line breaks.

#4

I just realized the NormalizeWhitespace includes stripping of line breaks as well. To keep things simple, I have added StripLineBreaks function.

1 Like