User Tools

Site Tools


stringformat

This is an old revision of the document!


String.Format

This static method of the System.String class is very, very useful.

It permits you to insert values into a string, like in this sample:

cString := String.Format( "Today is {0}", DateTime.Now:ToShortDateString() )

.

You can also control the formatting:

cString := String.Format( "It is now {0:d} at {0:t}", DateTime.Now )

For more details please see the Microsoft documentation: Get started with the String.Format method

stringformat.1517087429.txt.gz · Last modified: 2018/01/27 21:10 by wolfgangriedmann