wstring double quotes to string double quotes

Jonathan M Davis newsgroup.d at
Fri Apr 20 02:46:14 UTC 2018

On Thursday, April 19, 2018 23:24:05 Joel via Digitalmars-d-learn wrote:
> On Thursday, 19 April 2018 at 21:57:28 UTC, Adam D. Ruppe wrote:
> > On Thursday, 19 April 2018 at 21:53:52 UTC, Joel wrote:
> >> I have a program that uses string double quotes, but copies
> >> from wstring double quotes. The wstring double quotes are in
> >> string type (sourceTxt is a string with wstring double quotes).
> >
> > quotes are quotes, you don't need to convert to wstring here.
> >
> > I really don't think it should be throwing that error
> > regardless... but you also should be able to just do
> >
> > string[] sourceLines = sourceTxt.replace("”", `"`).split("\n");
> >
> > and skip the wstring part entirely.
> That worked! Thanks Adam.

Given that these functions really shouldn't be throw RangeErrors, please
create a bug report with example code that can someone can just run to
reproduce the issue (your example isn't runnable as-is). That way, the bug
can be fixed. Otherwise, it's probably just going to be lost, and someone
else may hit it in the future. Thanks.

- Jonathan M Davis

More information about the Digitalmars-d-learn mailing list