mutable string?
"Martin v. Löwis"
martin at v.loewis.de
Sun Jan 16 06:46:06 EST 2005
Torsten Mohr wrote:
> is there some string class that i can change in place,
> like perls strings?
array.array is mutable. You can use the 'c' code if
you want an array of characters.
> Is it possible to do some regex replacement functions
> that would even change its length?
You can't use re.sub array, but you can use re.search,
and you can perform slice assigment.
> Can i append to this string?
Yes.
> Is there some wrapper for C++ STL string class (if that
> would make sense)?
It would be possible, but I cannot see why one would want
to do that.
Regards,
Martin
More information about the Python-list
mailing list