Mercurial > projects > dwt-win
comparison dwt/dwthelper/utils.d @ 325:0c891bed575f
Remove debug prints
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 30 Nov 2008 09:43:39 +0100 |
parents | ba58cbca64a1 |
children | 1ee938a6e02e |
comparison
equal
deleted
inserted
replaced
324:ba58cbca64a1 | 325:0c891bed575f |
---|---|
521 int ignore; | 521 int ignore; |
522 int i = startIndex; | 522 int i = startIndex; |
523 if( searchRelCp > 0 ){ | 523 if( searchRelCp > 0 ){ |
524 while( searchRelCp !is 0 ){ | 524 while( searchRelCp !is 0 ){ |
525 | 525 |
526 //Trace.formatln( "( i+2 < str.length ) = {}", ( i+2 < str.length )); | |
527 //Trace.formatln( "( str[i+2] & 0xC0 ) is 0x80 ) = {}", (( str[i+2] & 0xC0 ) is 0x80 )); | |
528 //Trace.formatln( "( str[i+1] & 0xC0 ) is 0x80 ) = {}", (( str[i+1] & 0xC0 ) is 0x80 )); | |
529 //Trace.formatln( "( str[i ] & 0xF0 ) is 0xE0 ) = {}", (( str[i ] & 0xF0 ) is 0xE0 )); | |
530 | |
531 if( ( i < str.length ) | 526 if( ( i < str.length ) |
532 && (( str[i] & 0x80 ) is 0x00 )) | 527 && (( str[i] & 0x80 ) is 0x00 )) |
533 { | 528 { |
534 i+=1; | 529 i+=1; |
535 } | 530 } |
557 else{ | 552 else{ |
558 Trace.formatln( "getAbsoluteCodePointOffset invalid utf8 characters: {:X2}", cast(ubyte[]) str ); | 553 Trace.formatln( "getAbsoluteCodePointOffset invalid utf8 characters: {:X2}", cast(ubyte[]) str ); |
559 tango.text.convert.Utf.onUnicodeError( "invalid utf8 input", i ); | 554 tango.text.convert.Utf.onUnicodeError( "invalid utf8 input", i ); |
560 } | 555 } |
561 searchRelCp--; | 556 searchRelCp--; |
562 //Trace.formatln(" . "); | |
563 } | 557 } |
564 } | 558 } |
565 else if( searchRelCp < 0 ){ | 559 else if( searchRelCp < 0 ){ |
566 while( searchRelCp !is 0 ){ | 560 while( searchRelCp !is 0 ){ |
567 do{ | 561 do{ |
568 i--; | 562 i--; |
569 if( i < 0 ){ | 563 if( i < 0 ){ |
570 return startIndex-1; | 564 return startIndex-1; |
571 //Trace.formatln( "dwthelper.utils getRelativeCodePointOffset {}: str={}, startIndex={}, searchRelCp={}", __LINE__, str, startIndex, searchRelCp ); | |
572 //tango.text.convert.Utf.onUnicodeError( "invalid utf8 input", i ); | |
573 } | 565 } |
574 } while(( str[i] & 0xC0 ) is 0x80 ); | 566 } while(( str[i] & 0xC0 ) is 0x80 ); |
575 searchRelCp++; | 567 searchRelCp++; |
576 } | 568 } |
577 } | 569 } |