Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #265 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

tango.text.Util.locatePattern() failes on one-char patterns.

Reported by: xammy Assigned to: kris
Priority: major Milestone: 0.96 Beta 2
Component: Tango Version: trunk
Keywords: locatePattern Cc:

Description

locatePattern("abc", "b"); returns 3. This is because of

extent = source.length - start - match.length + 1

extent is source.length for one-char patterns, which gets filtered in line 234

http://www.dsource.org/projects/tango/browser/trunk/tango/text/Util.d#L228

Change History

02/10/07 19:41:33 changed by kris

  • status changed from new to closed.
  • version changed from 0.95 beta 1 to trunk.
  • resolution set to fixed.

fixed