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

Changes from Version 1 of AppendingExample/D2

Show
Ignore:
Author:
Andrej08 (IP: 78.2.57.183)
Timestamp:
09/05/10 16:29:12 (14 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AppendingExample/D2

    v0 v1  
     1= Appending = 
     2 
     3''Part of'' TutorialFundamentals 
     4 
     5== Description == 
     6 
     7Shows how appending works with D strings. 
     8 
     9== Example == 
     10 
     11{{{ 
     12#!d 
     13import std.stdio; 
     14 
     15void main()  
     16{ 
     17    string foo; 
     18 
     19    foo = "hello, "; 
     20    foo ~= "world!"; 
     21     
     22    writeln(foo);     
     23} 
     24}}} 
     25 
     26== Output == 
     27{{{ 
     28hello, world! 
     29}}} 
     30 
     31== More Info == 
     32 
     33Much more info can be found in the [http://www.digitalmars.com/d/2.0/arrays.html#strings D Specification].