retro() on a `string` creates a range of `dchar`, causing array() pains

Jakob Ovrum jakobovrum at gmail.com
Tue Apr 17 22:46:11 PDT 2012


On Tuesday, 17 April 2012 at 15:18:49 UTC, bearophile wrote:
> Jakob Ovrum:
>
>> 		return array(strippedTail);
>> 	}
>>
>> The type of the return expression is dstring, not string.
>>
>> What is the most elegant way or correct way to solve this 
>> friction?
>>
>> (Note: the function is used in CTFE)
>
> Try "text" instead of "array".
>
> Bye,
> bearophile

Thanks, that did it :)

(I also forgot to retro() a second time to make it build the 
array in the original direction, before anyone points it out)


More information about the Digitalmars-d-learn mailing list