Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changes between Version 12 and Version 13 of TutTextConversions

Show
Ignore:
Author:
kris (IP: 68.122.193.31)
Timestamp:
04/17/07 02:51:18 (17 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TutTextConversions

    v12 v13  
    1010{{{ 
    1111#!d 
    12     // from text to numbers 
    13     int i = Integer.parse("302"); 
    14     real d = Float.parse("3.14159"); 
     12// from text to numbers 
     13int i = Integer.parse("302"); 
     14real d = Float.parse("3.14159"); 
    1515 
    16     // and from numbers to text 
    17     char[] intString = Integer.toUtf8(32); 
    18     char[] floatString = Float.toUtf8(3.14159); 
     16// and from numbers to text 
     17char[] intString = Integer.toUtf8(32); 
     18char[] floatString = Float.toUtf8(3.14159); 
    1919}}} 
    2020 
    2323{{{ 
    2424#!d 
    25     char[] eight = Unicode.toUtf8("test"); 
    26     wchar[] sixteen  = Unicode.toUtf16("test"); 
    27     dchar[] thirtyTwo = Unicode.toUtf32("test"); 
     25char[] eight = Unicode.toUtf8("test"); 
     26wchar[] sixteen  = Unicode.toUtf16("test"); 
     27dchar[] thirtyTwo = Unicode.toUtf32("test"); 
    2828}}} 
    2929 
    3333{{{ 
    3434#!d 
    35     auto layout = new Layout!(char); 
    36     char[] str = layout ("{} sells {} by the {}","Sally", "shells", "seashore"); 
     35auto layout = new Layout!(char); 
     36char[] str = layout ("{} sells {} by the {}","Sally", "shells", "seashore"); 
    3737}}} 
    3838