[Tutor] list.replace -- string.swap

spir denis.spir at free.fr
Tue Mar 17 12:01:54 CET 2009


Is there a list.replace builtin I cannot find? Or a workaround?


Also: How would perform string.swap(s1, s2) in the following cases:

* There is no secure 'temp' char, meaning that
	s.replace(s1,temp).replace(s2,s1).replace(temp,s2)
  will fail because any char can be part of s.

* Either s1 or s2 can be more than a single char.

Denis
------
la vita e estrany


More information about the Tutor mailing list