Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Appending

Part of TutorialFundamentals

Description

Shows how appending works with D strings.

Example

import std.stdio;

void main() 
{
    string foo;

    foo = "hello, ";
    foo ~= "world!";
    
    writeln(foo);    
}

Output

hello, world!

More Info

Much more info can be found in the D Specification.