Mercurial > projects > dwt-win
diff dwt/internal/Compatibility.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 | 57151e2793a2 |
children | 36f5cb12e1a2 |
line wrap: on
line diff
--- a/dwt/internal/Compatibility.d Sat Apr 26 10:01:48 2008 +0200 +++ b/dwt/internal/Compatibility.d Mon May 05 00:12:38 2008 +0200 @@ -1,4 +1,4 @@ -/******************************************************************************* +/******************************************************************************* * Copyright (c) 2000, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -28,6 +28,7 @@ import Math = tango.math.Math; import Unicode = tango.text.Unicode; import tango.sys.Process; +import dwt.dwthelper.utils; /** * This class is a placeholder for utility methods commonly @@ -163,7 +164,7 @@ * @return a stream on the file if it could be opened. * @exception IOException */ -public static InputStream newFileInputStream(char[] filename) { +public static InputStream newFileInputStream(String filename) { return new FileInputStream(filename); } @@ -174,7 +175,7 @@ * @return a stream on the file if it could be opened. * @exception IOException */ -public static OutputStream newFileOutputStream(char[] filename) { +public static OutputStream newFileOutputStream(String filename) { return new FileOutputStream(filename); } @@ -243,7 +244,7 @@ * @exception ProcessException * if the program cannot be executed */ -public static void exec(char[] prog) { +public static void exec(String prog) { auto proc = new Process( prog ); proc.execute; } @@ -260,7 +261,7 @@ * @exception ProcessException * if the program cannot be executed */ -public static void exec(char[][] progArray) { +public static void exec(String[] progArray) { auto proc = new Process( progArray ); proc.execute; } @@ -341,15 +342,15 @@ * @param s2 string * @return true if the two instances of class String are equal */ -public static bool equalsIgnoreCase(char[] s1, char[] s2) { - char[] s1b = new char[ s1.length ]; - char[] s2b = new char[ s1.length ]; +public static bool equalsIgnoreCase(String s1, String s2) { + String s1b = new char[ s1.length ]; + String s2b = new char[ s1.length ]; scope(exit){ delete s1b; delete s2b; } - char[] s1c = Unicode.toFold( s1, s1b ); - char[] s2c = Unicode.toFold( s2, s2b ); + String s1c = Unicode.toFold( s1, s1b ); + String s2c = Unicode.toFold( s2, s2b ); return s1c == s2c; }