w32replaceItem misbehaving

new topic     » topic index » view thread      » older message » newer message

Hi,

The documentation for w32replaceItem says

  • w32replaceItem (sequence pList, object pOld, object pNew)
  • Replaces all occurances of pOld with pNew
  • Note this routine will not do recursive replacements. That is, if pNew contains pOld, it doesn't go into a never-ending loop.

Whilst it's true that it doesn't go into a never-ending loop, it does do additional text replacements if pNew contains pOld. Which I believe it shouldn't do.

Here's an example

include win32lib.ew 
sequence email 
email = "mark_young@mydomain.com" 
email = w32replaceItem(email, "@", "@@") 
puts(1, email)) 

This produces the result

mark_young@@@@@@@@@@@@mydomain.com 

Am I correct that this is wrong? Am I missing a simple way to turn a single @ into two?

Cheers,
Mark

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu