In our previous episode, Ivanko B said: > > Do you mean replacing a character in an UCS-2/UCS-4 string can be > > implemented more efficiently than in an UTF-8/UTF-16 string? > > > > Sure, just scan the string char by char as array elements and replace > as matches encounter. Like working with integer arrays.
The scanning is not what is expensive. The change of the match is. In both cases you need to reconstruct at least a 32-bit codepoint and match that against other codepoints in some datastructure. _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel