IIRC, chop() is a perl function.
The confusion arises in C/C++ with strings because the name "string" is often used interchangably for the C++ class string, and the "C-style" pointer to an array of characters. And there is quite a bit of difference between an object and a char*
AFAIK, internally, the C++ class string really is just a sort of character array, only with seperate classes for characters to deal with unicode and all that. I remember the first time I saw what "string" actually represents in the debugger, something like three nested templated classes... I was confused for about 10 minutes as to why the function it said was behaving badly was taking that monster as an argument instead of the innocent "string" type I had it taking. But, for most people, as long as you know those functions, you can leave all the nasty bits (such as converting the object to an array of dynamically allocated characters) to the class, and go on your merry way
