MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / nolinesep

Function nolinesep

src/commoncode/text.py:83–89  ·  view source on GitHub ↗

Remove line separators, replacing them with spaces.

(text)

Source from the content-addressed store, hash-verified

81
82
83def nolinesep(text):
84 """
85 Remove line separators, replacing them with spaces.
86 """
87 if not isinstance(text, str):
88 text = as_unicode(text)
89 return text.replace(CR, " ").replace(LF, " ")
90
91
92def toascii(s, translit=False):

Callers

nothing calls this directly

Calls 2

as_unicodeFunction · 0.70
replaceMethod · 0.45

Tested by

no test coverage detected