kungfu71186 0 Newbie Poster

I have a project where we have to "clean" a formula. So if

17 + 18/abc454 * (9/10)

is put in then it should output

17+18/454*(9/10)

Well i got that part and what i do is store it in a buffer (.space) because then i have to go through that and check for the () and operands and print it out up to that operand each time it finds one.

Problem i am having though is this is a subroutine so every time it calls it, it still has the previous bytes in the space. So if the first string is longer than the second one, then you will see bytes from the last string. I was wondering if there is

1. an easy way to set the space back to null (\0) or
2. a different way someone may suggest in doing this.

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.