Re: Using replaceInPlace, string and char[]

2015-08-16 Thread TSalm via Digitalmars-d-learn
> Must create a ticket for it ? I think so. Unless others object in 10 minutes... :) :-) Done : https://issues.dlang.org/show_bug.cgi?id=14925 Thanks for your help

Re: Using replaceInPlace, string and char[]

2015-08-15 Thread TSalm via Digitalmars-d-learn
On Saturday, 15 August 2015 at 08:07:43 UTC, Ali Çehreli wrote: This looks like a bug to me. The template constraints of the two overloads are pretty complicated. This case should match only one of them. Yes I understand. I've used ldc2. With DMD (v0.067.1) the error is more clear : inout.d(1

Using replaceInPlace, string and char[]

2015-08-15 Thread TSalm via Digitalmars-d-learn
Hi, A newbie question : I wrote this simple code : import std.array; import std.stdio; void main() { char[] a = "mon texte 1".dup; char[] b = "abc".dup; size_t x = 4; size_t y = 9; replaceInPlace( a, x , y, b );