Ron Adam dixit (2011-10-06, 12:42):
It seems to me, the methods on the string object should be the lower level fast C methods that allow for efficient higher level functions to be built.
I suggest to make it as a C method and type. The Python implementation I gave is an illustration only ("naive implementation").
Cheers. *j