>Fabio,
>
>>VFP CHRTRAN, when don't remove character, don't use a
O(n)>>( because this not exist ), but it use a
O(n*m) program.
>
>Sorry, to disrupt your belief, but it
can be done
O(n) without regard to the length of the second and third arguments (assuming that is what the m means in your above calculation). A simple 256 character transformation matrix can be constructed, where the input character is used as an index into the matrix to get the output character. The translation line in the C++ code would look like this then:
>
>
> *cpOut++ = XLatMatrix[*cpIn]; // translate the character and advance the output pointer
>
>
>>Any developer, with a little backgroud, known that this task can to be make
>>in
O((n+m)*Log(min(n,m))).
>
>So I guess that makes me a little better than any developer with a little background. *bg*
See SYS(15).
This is writted on Message #
951329.
This technique it is valid for a short second string, not in general cases.
End.