Format
This demo covers the Tripous formatting helpers. They provide C#-style string placeholders, number formatting with standard and simple custom .NET-like patterns, explicit-separator number formatting, and date-time pattern formatting.
tp.Format() only replaces placeholders such as {0} and {1}.
Number and date values should be formatted first with tp.FormatNumber(),
tp.FormatNumber2(), or tp.FormatDateTime(), and then inserted into
the final string.
String placeholders
tp.Format() replaces numbered placeholders. tp._F()
is a short alias for the same helper.
Standard number formats
tp.FormatNumber() supports standard numeric format strings such as
D, F, N, and C.
Custom number formats
Simple custom patterns such as 00000, 0.00, and
#,##0.00 are also supported.
Date and culture helpers
tp.FormatDateTime() uses date-time pattern tokens such as
yyyy, MM, dd, HH, and
mm. Culture helper functions report separators and date formats.