|
Lines 483-500
Link Here
|
| 483 |
if (stringToCompare == null) |
483 |
if (stringToCompare == null) |
| 484 |
return false; |
484 |
return false; |
| 485 |
|
485 |
|
|
|
486 |
int ajustedOffset = fOffset + offset; |
| 486 |
boolean result = false; |
487 |
boolean result = false; |
| 487 |
if (fCharSequenceSource != null && fCharSequenceSource instanceof IRegionComparible) { |
488 |
if (fCharSequenceSource != null && fCharSequenceSource instanceof IRegionComparible) { |
| 488 |
result = ((IRegionComparible) fCharSequenceSource).regionMatches(offset, length, stringToCompare); |
489 |
result = ((IRegionComparible) fCharSequenceSource).regionMatches(ajustedOffset, length, stringToCompare); |
| 489 |
} |
490 |
} |
| 490 |
else { |
491 |
else { |
| 491 |
// old fashioned ways |
492 |
// old fashioned ways |
| 492 |
String test = null; |
493 |
String test = null; |
| 493 |
if (fCharSequenceSource != null) { |
494 |
if (fCharSequenceSource != null) { |
| 494 |
test = fCharSequenceSource.subSequence(offset, offset + length).toString(); |
495 |
test = fCharSequenceSource.subSequence(ajustedOffset, ajustedOffset + length).toString(); |
| 495 |
} |
496 |
} |
| 496 |
else if (fStringInput != null) { |
497 |
else if (fStringInput != null) { |
| 497 |
test = fStringInput.substring(offset, offset + length); |
498 |
test = fStringInput.substring(ajustedOffset, ajustedOffset + length); |
| 498 |
} |
499 |
} |
| 499 |
result = stringToCompare.equals(test); |
500 |
result = stringToCompare.equals(test); |
| 500 |
} |
501 |
} |
|
Lines 506-523
Link Here
|
| 506 |
if (stringToCompare == null) |
507 |
if (stringToCompare == null) |
| 507 |
return false; |
508 |
return false; |
| 508 |
|
509 |
|
|
|
510 |
int ajustedOffset = fOffset + offset; |
| 509 |
boolean result = false; |
511 |
boolean result = false; |
| 510 |
if (fCharSequenceSource != null && fCharSequenceSource instanceof IRegionComparible) { |
512 |
if (fCharSequenceSource != null && fCharSequenceSource instanceof IRegionComparible) { |
| 511 |
result = ((IRegionComparible) fCharSequenceSource).regionMatchesIgnoreCase(offset, length, stringToCompare); |
513 |
result = ((IRegionComparible) fCharSequenceSource).regionMatchesIgnoreCase(ajustedOffset, length, stringToCompare); |
| 512 |
} |
514 |
} |
| 513 |
else { |
515 |
else { |
| 514 |
// old fashioned ways |
516 |
// old fashioned ways |
| 515 |
String test = null; |
517 |
String test = null; |
| 516 |
if (fCharSequenceSource != null) { |
518 |
if (fCharSequenceSource != null) { |
| 517 |
test = fCharSequenceSource.subSequence(offset, offset + length).toString(); |
519 |
test = fCharSequenceSource.subSequence(ajustedOffset, ajustedOffset + length).toString(); |
| 518 |
} |
520 |
} |
| 519 |
else if (fStringInput != null) { |
521 |
else if (fStringInput != null) { |
| 520 |
test = fStringInput.substring(offset, offset + length); |
522 |
test = fStringInput.substring(ajustedOffset, ajustedOffset + length); |
| 521 |
} |
523 |
} |
| 522 |
result = stringToCompare.equalsIgnoreCase(test); |
524 |
result = stringToCompare.equalsIgnoreCase(test); |
| 523 |
} |
525 |
} |