comparison dwt/dwthelper/System.d @ 212:ab60f3309436

reverted the char[] to String and use the an alias.
author Frank Benoit <benoit@tionex.de>
date Mon, 05 May 2008 00:12:38 +0200
parents 184ab53b7785
children cba62ee36290
comparison
equal deleted inserted replaced
211:ff59aeb96cac 212:ab60f3309436
4 module dwt.dwthelper.System; 4 module dwt.dwthelper.System;
5 5
6 import tango.core.Exception; 6 import tango.core.Exception;
7 import tango.time.Clock; 7 import tango.time.Clock;
8 import tango.stdc.stdlib : exit; 8 import tango.stdc.stdlib : exit;
9
10 import dwt.dwthelper.utils;
9 11
10 template SimpleType(T) { 12 template SimpleType(T) {
11 debug{ 13 debug{
12 static void validCheck(uint SrcLen, uint DestLen, uint copyLen){ 14 static void validCheck(uint SrcLen, uint DestLen, uint copyLen){
13 if(SrcLen < copyLen || DestLen < copyLen|| SrcLen < 0 || DestLen < 0){ 15 if(SrcLen < copyLen || DestLen < copyLen|| SrcLen < 0 || DestLen < 0){
133 return 0; 135 return 0;
134 } 136 }
135 return (*cast(Object *)&x).toHash(); 137 return (*cast(Object *)&x).toHash();
136 } 138 }
137 139
138 public static char[] getProperty( char[] key ){ 140 public static String getProperty( String key ){
139 switch( key ){ 141 switch( key ){
140 case "os.name": return "windows"; 142 case "os.name": return "windows";
141 default: return null; 143 default: return null;
142 } 144 }
143 } 145 }