comparison 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
comparison
equal deleted inserted replaced
7:33be57450a23 8:2847134a5fc0
45 import org.eclipse.swt.widgets.Shell; 45 import org.eclipse.swt.widgets.Shell;
46 import org.eclipse.swt.widgets.Text; 46 import org.eclipse.swt.widgets.Text;
47 import org.eclipse.swt.widgets.TypedListener; 47 import org.eclipse.swt.widgets.TypedListener;
48 import org.eclipse.swt.widgets.Widget; 48 import org.eclipse.swt.widgets.Widget;
49 49
50 static import tango.text.convert.Utf;
51 static import tango.text.Unicode;
52 import java.lang.all; 50 import java.lang.all;
53 import java.lang.Runnable; 51 import java.lang.Runnable;
54 52
55 /** 53 /**
56 * The CCombo class represents a selectable user interface object 54 * The CCombo class represents a selectable user interface object
584 int index = 0; 582 int index = 0;
585 int length = string.length; 583 int length = string.length;
586 do { 584 do {
587 while (index < length && string[index] !is '&') index++; 585 while (index < length && string[index] !is '&') index++;
588 if (++index >= length) return '\0'; 586 if (++index >= length) return '\0';
589 if (string[index] !is '&') { 587 dchar c = string[index..$].firstCodePoint();
590 dchar[1] d; uint ate; 588 if (c !is '&') {
591 auto d2 = tango.text.convert.Utf.toString32( string[ index .. Math.min( index +4, string.length )], d, &ate ); 589 return Character.toLowerCase(c);
592 auto d3 = tango.text.Unicode.toLower( d2, d2 );
593 return d3[0];
594 } 590 }
595 index++; 591 index++;
596 } while (index < length); 592 } while (index < length);
597 return '\0'; 593 return '\0';
598 } 594 }