Mercurial > projects > dwt-linux
annotate dwt/internal/Compatibility.d @ 259:c0d810de7093
Update SWT 3.4M7 to 3.4
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 29 Jun 2008 14:33:38 +0200 |
parents | ce446666f5a2 |
children | 9e715c0a8376 |
rev | line source |
---|---|
240 | 1 /******************************************************************************* |
259 | 2 * Copyright (c) 2000, 2007 IBM Corporation and others. |
0 | 3 * All rights reserved. This program and the accompanying materials |
4 * are made available under the terms of the Eclipse Public License v1.0 | |
5 * which accompanies this distribution, and is available at | |
6 * http://www.eclipse.org/legal/epl-v10.html | |
7 * | |
8 * Contributors: | |
9 * IBM Corporation - initial API and implementation | |
108 | 10 * Port to the D programming language: |
11 * Frank Benoit <benoit@tionex.de> | |
0 | 12 *******************************************************************************/ |
10
63c023465156
moved from org.eclipse.swt to dwt
Frank Benoit <benoit@tionex.de>
parents:
9
diff
changeset
|
13 module dwt.internal.Compatibility; |
0 | 14 |
238 | 15 import dwt.dwthelper.utils; |
0 | 16 /+ |
240 | 17 import java.io.File; |
0 | 18 import java.text.MessageFormat; |
19 import java.util.MissingResourceException; | |
20 import java.util.ResourceBundle; | |
240 | 21 import java.util.zip.DeflaterOutputStream; |
0 | 22 import java.util.zip.InflaterInputStream; |
23 +/ | |
24 | |
71 | 25 import dwt.DWT; |
12 | 26 public import dwt.dwthelper.FileInputStream; |
27 public import dwt.dwthelper.FileOutputStream; | |
28 public import dwt.dwthelper.InflaterInputStream; | |
240 | 29 import dwt.dwthelper.BufferedInputStream; |
1 | 30 |
0 | 31 import Math = tango.math.Math; |
32 import Unicode = tango.text.Unicode; | |
33 import tango.sys.Process; | |
34 | |
35 /** | |
36 * This class is a placeholder for utility methods commonly | |
37 * used on J2SE platforms but not supported on some J2ME | |
38 * profiles. | |
39 * <p> | |
40 * It is part of our effort to provide support for both J2SE | |
41 * and J2ME platforms. | |
42 * </p> | |
43 * <p> | |
44 * IMPORTANT: some of the methods have been modified from their | |
45 * J2SE parents. Refer to the description of each method for | |
46 * specific changes. | |
47 * </p> | |
48 * <ul> | |
49 * <li>Exceptions thrown may differ since J2ME's set of | |
50 * exceptions is a subset of J2SE's one. | |
51 * </li> | |
52 * <li>The range of the mathematic functions is subject to | |
53 * change. | |
54 * </li> | |
55 * </ul> | |
56 */ | |
57 public final class Compatibility { | |
58 | |
59 /** | |
60 * Returns the PI constant as a double. | |
61 */ | |
62 public static const real PI = Math.PI; | |
63 | |
64 static const real toRadians = PI / 180; | |
65 | |
66 /** | |
67 * Answers the length of the side adjacent to the given angle | |
68 * of a right triangle. In other words, it returns the integer | |
69 * conversion of length * cos (angle). | |
70 * <p> | |
71 * IMPORTANT: the j2me version has an additional restriction on | |
72 * the argument. length must be between -32767 and 32767 (inclusive). | |
73 * </p> | |
74 * | |
75 * @param angle the angle in degrees | |
76 * @param length the length of the triangle's hypotenuse | |
77 * @return the integer conversion of length * cos (angle) | |
78 */ | |
79 public static int cos(int angle, int length) { | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
80 return cast(int)(Math.cos(angle * toRadians) * length); |
0 | 81 } |
82 | |
83 /** | |
84 * Answers the length of the side opposite to the given angle | |
85 * of a right triangle. In other words, it returns the integer | |
86 * conversion of length * sin (angle). | |
87 * <p> | |
88 * IMPORTANT: the j2me version has an additional restriction on | |
89 * the argument. length must be between -32767 and 32767 (inclusive). | |
90 * </p> | |
91 * | |
92 * @param angle the angle in degrees | |
93 * @param length the length of the triangle's hypotenuse | |
94 * @return the integer conversion of length * sin (angle) | |
95 */ | |
96 public static int sin(int angle, int length) { | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
97 return cast(int)(Math.sin(angle * toRadians) * length); |
0 | 98 } |
99 | |
100 /** | |
101 * Answers the most negative (i.e. closest to negative infinity) | |
102 * integer value which is greater than the number obtained by dividing | |
103 * the first argument p by the second argument q. | |
104 * | |
105 * @param p numerator | |
106 * @param q denominator (must be different from zero) | |
107 * @return the ceiling of the rational number p / q. | |
108 */ | |
109 public static int ceil(int p, int q) { | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
110 return cast(int)Math.ceil(cast(float)p / q); |
0 | 111 } |
112 | |
113 /** | |
240 | 114 * Answers whether the indicated file exists or not. |
115 * | |
116 * @param parent the file's parent directory | |
117 * @param child the file's name | |
118 * @return true if the file exists | |
119 */ | |
120 public static bool fileExists(String parent, String child) { | |
121 return (new File (parent, child)).exists(); | |
122 } | |
123 | |
124 /** | |
0 | 125 * Answers the most positive (i.e. closest to positive infinity) |
126 * integer value which is less than the number obtained by dividing | |
127 * the first argument p by the second argument q. | |
128 * | |
129 * @param p numerator | |
130 * @param q denominator (must be different from zero) | |
131 * @return the floor of the rational number p / q. | |
132 */ | |
133 public static int floor(int p, int q) { | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
134 return cast(int)Math.floor(cast(double)p / q); |
0 | 135 } |
136 | |
137 /** | |
138 * Answers the result of rounding to the closest integer the number obtained | |
139 * by dividing the first argument p by the second argument q. | |
140 * <p> | |
141 * IMPORTANT: the j2me version has an additional restriction on | |
142 * the arguments. p must be within the range 0 - 32767 (inclusive). | |
143 * q must be within the range 1 - 32767 (inclusive). | |
144 * </p> | |
145 * | |
146 * @param p numerator | |
147 * @param q denominator (must be different from zero) | |
148 * @return the closest integer to the rational number p / q | |
149 */ | |
150 public static int round(int p, int q) { | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
151 return cast(int)Math.round(cast(float)p / q); |
0 | 152 } |
153 | |
154 /** | |
155 * Returns 2 raised to the power of the argument. | |
156 * | |
157 * @param n an int value between 0 and 30 (inclusive) | |
158 * @return 2 raised to the power of the argument | |
159 * | |
160 * @exception IllegalArgumentException <ul> | |
161 * <li>ERROR_INVALID_RANGE - if the argument is not between 0 and 30 (inclusive)</li> | |
162 * </ul> | |
163 */ | |
164 public static int pow2(int n) { | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
165 if (n >= 1 && n <= 30) |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
166 return 2 << (n - 1); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
167 else if (n != 0) { |
71 | 168 DWT.error(DWT.ERROR_INVALID_RANGE); |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
169 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
170 return 1; |
0 | 171 } |
4 | 172 |
0 | 173 /** |
240 | 174 * Create an DeflaterOutputStream if such things are supported. |
175 * | |
176 * @param stream the output stream | |
177 * @return a deflater stream or <code>null</code> | |
178 * @exception IOException | |
179 * | |
180 * @since 3.4 | |
181 */ | |
182 public static OutputStream newDeflaterOutputStream(OutputStream stream) { | |
183 implMissing(__FILE__,__LINE__); | |
184 return null; | |
185 //DWT_TODO return new DeflaterOutputStream(stream); | |
186 } | |
187 | |
188 /** | |
0 | 189 * Open a file if such things are supported. |
190 * | |
191 * @param filename the name of the file to open | |
192 * @return a stream on the file if it could be opened. | |
193 * @exception IOException | |
194 */ | |
238 | 195 public static InputStream newFileInputStream(String filename) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
196 return new FileInputStream(filename); |
0 | 197 } |
198 | |
199 /** | |
200 * Open a file if such things are supported. | |
201 * | |
202 * @param filename the name of the file to open | |
203 * @return a stream on the file if it could be opened. | |
204 * @exception IOException | |
205 */ | |
238 | 206 public static OutputStream newFileOutputStream(String filename) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
207 return new FileOutputStream(filename); |
0 | 208 } |
209 | |
210 /** | |
211 * Create an InflaterInputStream if such things are supported. | |
212 * | |
213 * @param stream the input stream | |
214 * @return a inflater stream or <code>null</code> | |
215 * @exception IOException | |
216 * | |
217 * @since 3.3 | |
218 */ | |
12 | 219 public static InflaterInputStream newInflaterInputStream(InputStream stream) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
220 return new InflaterInputStream(stream); |
0 | 221 } |
4 | 222 |
0 | 223 /** |
224 * Answers whether the character is a letter. | |
225 * | |
226 * @param c the character | |
227 * @return true when the character is a letter | |
228 */ | |
229 public static bool isLetter(dchar c) { | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
230 return Unicode.isLetter(c); |
0 | 231 } |
232 | |
233 /** | |
234 * Answers whether the character is a letter or a digit. | |
235 * | |
236 * @param c the character | |
237 * @return true when the character is a letter or a digit | |
238 */ | |
239 public static bool isLetterOrDigit(dchar c) { | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
240 return Unicode.isLetterOrDigit(c); |
0 | 241 } |
242 | |
243 /** | |
244 * Answers whether the character is a Unicode space character. | |
245 * | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
246 * @param c the character |
0 | 247 * @return true when the character is a Unicode space character |
248 */ | |
249 public static bool isSpaceChar(dchar c) { | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
250 return Unicode.isSpace(c); |
0 | 251 } |
252 | |
253 /** | |
254 * Answers whether the character is a whitespace character. | |
255 * | |
256 * @param c the character to test | |
257 * @return true if the character is whitespace | |
258 */ | |
259 public static bool isWhitespace(dchar c) { | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
260 return Unicode.isWhitespace(c); |
0 | 261 } |
262 | |
263 /** | |
264 * Execute a program in a separate platform process if the | |
265 * underlying platform support this. | |
266 * <p> | |
267 * The new process inherits the environment of the caller. | |
268 * </p> | |
269 * | |
270 * @param prog the name of the program to execute | |
271 * | |
272 * @exception ProcessException | |
273 * if the program cannot be executed | |
274 */ | |
238 | 275 public static void exec(String prog) { |
0 | 276 auto proc = new Process( prog ); |
277 proc.execute; | |
278 } | |
279 | |
280 /** | |
281 * Execute progArray[0] in a separate platform process if the | |
282 * underlying platform support this. | |
283 * <p> | |
284 * The new process inherits the environment of the caller. | |
285 * <p> | |
286 * | |
287 * @param progArray array containing the program to execute and its arguments | |
288 * | |
289 * @exception ProcessException | |
290 * if the program cannot be executed | |
291 */ | |
238 | 292 public static void exec(String[] progArray) { |
0 | 293 auto proc = new Process( progArray ); |
294 proc.execute; | |
295 } | |
296 /++ PORTING_LEFT | |
297 private static ResourceBundle msgs = null; | |
298 | |
299 /** | |
300 * Returns the NLS'ed message for the given argument. This is only being | |
71 | 301 * called from DWT. |
0 | 302 * |
303 * @param key the key to look up | |
304 * @return the message for the given key | |
305 * | |
71 | 306 * @see DWT#getMessage(String) |
0 | 307 */ |
308 public static String getMessage(String key) { | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
309 String answer = key; |
0 | 310 |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
311 if (key == null) { |
71 | 312 DWT.error (DWT.ERROR_NULL_ARGUMENT); |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
313 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
314 if (msgs == null) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
315 try { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
316 msgs = ResourceBundle.getBundle("dwt.internal.SWTMessages"); //$NON-NLS-1$ |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
317 } catch (MissingResourceException ex) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
318 answer = key + " (no resource bundle)"; //$NON-NLS-1$ |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
319 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
320 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
321 if (msgs != null) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
322 try { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
323 answer = msgs.getString(key); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
324 } catch (MissingResourceException ex2) {} |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
325 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
326 return answer; |
0 | 327 } |
328 | |
329 public static String getMessage(String key, Object[] args) { | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
330 String answer = key; |
0 | 331 |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
332 if (key == null || args == null) { |
71 | 333 DWT.error (DWT.ERROR_NULL_ARGUMENT); |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
334 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
335 if (msgs == null) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
336 try { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
337 msgs = ResourceBundle.getBundle("dwt.internal.SWTMessages"); //$NON-NLS-1$ |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
338 } catch (MissingResourceException ex) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
339 answer = key + " (no resource bundle)"; //$NON-NLS-1$ |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
340 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
341 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
342 if (msgs != null) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
343 try { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
344 MessageFormat formatter = new MessageFormat(""); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
345 formatter.applyPattern(msgs.getString(key)); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
346 answer = formatter.format(args); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
347 } catch (MissingResourceException ex2) {} |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
348 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
349 return answer; |
0 | 350 } |
46 | 351 ++/ |
352 | |
0 | 353 |
354 /** | |
355 * Interrupt the current thread. | |
356 * <p> | |
357 * Note that this is not available on CLDC. | |
358 * </p> | |
359 */ | |
360 public static void interrupt() { | |
46 | 361 //PORTING_FIXME: how to implement?? |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
362 //Thread.currentThread().interrupt(); |
0 | 363 } |
46 | 364 |
0 | 365 /** |
366 * Compares two instances of class String ignoring the case of the | |
367 * characters and answers if they are equal. | |
368 * | |
369 * @param s1 string | |
370 * @param s2 string | |
371 * @return true if the two instances of class String are equal | |
372 */ | |
238 | 373 public static bool equalsIgnoreCase(String s1, String s2) { |
374 String s1b = new char[ s1.length ]; | |
375 String s2b = new char[ s1.length ]; | |
0 | 376 scope(exit){ |
377 delete s1b; | |
378 delete s2b; | |
379 } | |
238 | 380 String s1c = Unicode.toFold( s1, s1b ); |
381 String s2c = Unicode.toFold( s2, s2b ); | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
46
diff
changeset
|
382 return s1c == s2c; |
0 | 383 } |
384 | |
385 } |