#1 2020-11-11 12:03:18

edwinsn
Member
Registered: 2010-07-02
Posts: 1,218

[Suggestion] Support '\n', '\t' in ForumatUtf8

@ab,

It's very common to use '\n' to represent a 'new line', and '\t' to represent a TAB character in the programming.
In the Delphi community, I know at least DK Language supports these notions.
It'll be a nice addition if we can add those support in FormatUtf8 wink


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#2 2020-11-11 12:16:03

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: [Suggestion] Support '\n', '\t' in ForumatUtf8

It would break existing code for sure, and it is a C-like feature.
There is no escape in FormatUTF8() - even the % can not be escaped.
In pascal we have 'some text'#10'another line' which is not so awful to write and faster/safer to process.

Offline

Board footer

Powered by FluxBB