Mercurial > projects > dwt2
diff org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/CCombo.d @ 8:2847134a5fc0
more tango abstraction
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 05 Mar 2009 15:12:35 +0100 |
parents | f36c67707cb3 |
children | 536e43f63c81 |
line wrap: on
line diff
--- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/CCombo.d Thu Mar 05 00:21:10 2009 +0100 +++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/custom/CCombo.d Thu Mar 05 15:12:35 2009 +0100 @@ -47,8 +47,6 @@ import org.eclipse.swt.widgets.TypedListener; import org.eclipse.swt.widgets.Widget; -static import tango.text.convert.Utf; -static import tango.text.Unicode; import java.lang.all; import java.lang.Runnable; @@ -586,11 +584,9 @@ do { while (index < length && string[index] !is '&') index++; if (++index >= length) return '\0'; - if (string[index] !is '&') { - dchar[1] d; uint ate; - auto d2 = tango.text.convert.Utf.toString32( string[ index .. Math.min( index +4, string.length )], d, &ate ); - auto d3 = tango.text.Unicode.toLower( d2, d2 ); - return d3[0]; + dchar c = string[index..$].firstCodePoint(); + if (c !is '&') { + return Character.toLowerCase(c); } index++; } while (index < length);