On 06/21/2010 06:43 AM, Ben Hanson wrote:
I've changed the code to use CharT[] again, which simplified things
substantially. However, I can't find a way to erase characters from a char[].
Can anyone help?
http://www.digitalmars.com/d/2.0/phobos/std_array.html#replace
Andrei
Ben Hanson:
> However, I can't find a way to erase characters from a char[].
> Can anyone help?
If you need to delete the last chars you can just decrease the length. If you
need to delete chars in the middle you can copy items with memmove() and then
decrease the length. You can also write a fu
I've changed the code to use CharT[] again, which simplified things
substantially. However, I can't find a way to erase characters from a char[].
Can anyone help?
See the current code below.
Thanks,
Ben
module main;
import std.algorithm;
import std.string;
template regex(CharT)
{
struct basic