Platforms to show: All Mac Windows Linux Cross-Platform

ReplaceLineEndingsMBS(Text as String, NewLine as String, yield as boolean = false) as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
global method String MBS Util Plugin 19.0 Yes Yes Yes Yes No
Function: Replaces line endings.
dim s as string = "Some text"
dim t as string = ReplaceLineEndingsMBS(s, endofline.Unix)
Whether we got CR, LF, CRLF or even LFCR, we'll replace it with the given replacement text.
If yield is true, we yield to other Xojo threads every 16 MB of input text to keep other threads responsive.

Handles UTF16/UTF32 by converting first to UTF-8.
Other 8 bit encodings (or no encoding set) are passed through.

Returns new text. May raise OutOfMemoryException in case of no memory available.

Blog Entries

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Util Plugin.

The biggest plugin in space...

MBS Xojo Chart Plugins