digitalmars.D.announce - Nanu library on dsource
- Mark Mohr (1/1) Jan 31 2008 The nanu library source that I have been working on is now on dsource.
- J Duncan (2/3) Jan 31 2008 Uh.... you may want to tell people what it is....
- Mark Mohr (40/44) Feb 01 2008 OK..
- Lionello Lunesu (3/6) Feb 01 2008 I think this is a brilliant idea!
The nanu library source that I have been working on is now on dsource.
Jan 31 2008
Mark Mohr wrote:The nanu library source that I have been working on is now on dsource.Uh.... you may want to tell people what it is....
Jan 31 2008
OK.. .Net. To recompile in D. There will be some minor tweaking but the syntax for the most part will remain the same. There is still a lot do do and check out the dsource page. http://www.dsource.org/projects/nanu If interested in helping out let me know. here is an example... import system.console; import system.int32; import system.text.asciiencoding; import system.text.utf8encoding; int main(){ try{ // The endoding. //ASCIIEncoding e = new ASCIIEncoding(); UTF8Encoding e = new UTF8Encoding(); // A Unicode string with two characters outside the ASCII code range nchar[] unicodeString = "This Unicode string contains two characters with codes outside the ASCII code range, Pi (\u03a0) and Sigma (\u03a3)."; Console.WriteLine("Original string:"); Console.WriteLine(unicodeString); Console.WriteLine("Length = " ~ Int32(unicodeString.length).ToString()); Console.WriteLine(); ubyte[] encodedBytes = e.GetBytes(unicodeString); foreach(ubyte b; encodedBytes){ Console.Write("[" ~ Int32(cast(int)b).ToString() ~ "]"); } Console.WriteLine(); nchar[] decodeString = e.GetString(encodedBytes); Console.WriteLine(); Console.WriteLine("Decoded bytes:"); Console.WriteLine(decodeString); } catch(Exception e){ Console.WriteLine(e.ToString()); } return 0; } J Duncan Wrote:Mark Mohr wrote:The nanu library source that I have been working on is now on dsource.Uh.... you may want to tell people what it is....
Feb 01 2008
Mark Mohr wrote:OK.. .Net. To recompile in D.I think this is a brilliant idea! L.
Feb 01 2008