>>Left >> right = move chars that will not necessarily be in the end result >> >> >>Right >> left = never move chars that are not in the end result >> >>eg: take * out >> >>12*4*6*89 >> >>Left >> right >>move 1: 4*6*89 6 chars where 2 not in the end result >>move 2: 6*89 4 chars where 1 not in the end result >>move 3: 89 2 chars where 0 not in the end result >> --- >> 12 chars where 3 not in the end result >> >>Right to left >> >>move 1: 89 2 chars where 0 not in the end result >>move 2: 689 3 chars where 0 not in the end result >>move 3: 4689 4 chars where 0 not in the end result >> --- >> 9 chars where 0 not in the end result >>>
>if Param2Lengh=Param3Lengh => none char is removed, then use a on place trasl > for prtReadWrite^=1 .... ++ > { if ... > prtReadWrite^=... > } >else => use a two pointers a Read and a Write > prtWrite^=1 > for prtRead^=1 ++ > { if ... > .... > prtWrite^= > prtWrite++ > } > stringLen = prtWrite-prtStart >I know it can be done with two pointers (and a translation table)