[Issue 9629] toUpperInPlace doesn't work properly with unicode characters

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Mar 4 23:26:14 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9629



--- Comment #3 from Manu <turkeyman at gmail.com> 2013-03-04 23:26:13 PST ---
At a glance, it looks to me like the problem is this line:

  s = s[0 .. i] ~ toAdd  ~ s[j .. $];

See, it's not overwriting any memory, it's allocating and writing into new
memory... that contradicts the 'InPlace' specification.

Shouldn't that line be more like:
  s[i .. j] = toAdd[];

And I don't think there's any reason for the function to receive a 'ref'.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list