« MBS Xojo Plugins, ver… | Home | MBS Xojo Plugins, ver… »

New ReplaceLineEndingsMBS function

For a client, we add a new ReplaceLineEndingsMBS function to the MBS Xojo Plugin.
It addresses two problems the built-in Xojo function has:
  • Performance: We can do the same job approximately 30% faster as far as we measured.
  • Yielding: If you process 100 MB blocks, a yield every few MB may help to keep the application responsive, especially if you use the function on a thread.
Our new function handles all combinations of CR, LF, CRLF and LFCR correctly and replaces them with the given replacement text. The operation is done in binary mode for 8 bit encodings or no text encoding. For UTF16/32, we first convert to UTF-8.

The new function will be available soon in the next prerelease. See also other functions like ReplaceNonPrintableCharactersMBS. The biggest plugin in space...
04 01 19 - 10:05