diff dwt/internal/Compatibility.d @ 238:380bad9f6852

reverted char[] to String
author Frank Benoit <benoit@tionex.de>
date Mon, 05 May 2008 00:42:55 +0200
parents 0f12f6bb9739
children ce446666f5a2
line wrap: on
line diff
--- a/dwt/internal/Compatibility.d	Sat Apr 26 10:01:30 2008 +0200
+++ b/dwt/internal/Compatibility.d	Mon May 05 00:42:55 2008 +0200
@@ -12,6 +12,8 @@
  *******************************************************************************/
 module dwt.internal.Compatibility;
 
+import dwt.dwthelper.utils;
+
 /+
 import java.io.*;
 import java.text.MessageFormat;
@@ -163,7 +165,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 +176,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 +245,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 +262,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 +343,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;
 }