Issue 97001

Summary: bug in replace() function
Product: App Dev Reporter: vladislav_yurov <vlad>
Component: scriptingAssignee: vladislav_yurov <vlad>
Status: CLOSED DUPLICATE QA Contact: Unknown <non-migrated>
Severity: Trivial    
Priority: P3 CC: damjan, issues, salva
Version: 3.3.0 or older (OOo)   
Target Milestone: ---   
Hardware: PC (x86_64)   
OS: Windows XP   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description vladislav_yurov 2008-12-08 08:14:44 UTC
Replace function work incorrectly when replaced fragment comes in source string 
more then once.

sub main
  msgbox replace("s p a c e s "," ","") ' "sp ce "
  msgbox replace("12223","2","xx") ' "1xxxx23"
end sum
Comment 1 salva 2012-07-06 19:28:00 UTC
Replace function work incorrectly  AOO 3.4 Spanish version in Windows Vista

Example

Sub Main
dim s as string, c as string
s = "SbxOBJECT addMetadataFile ( SbxSTRING, SbxARRAY )"
c = replace( s, "Sbx", "" )
msgbox c
End Sub

result: "OBJECT addMetadataFile ( SbxSTRING, SbxARRAY )"

Regards
Comment 2 damjan 2012-10-31 17:03:32 UTC
This bug is duplicated. Resolving.

*** This issue has been marked as a duplicate of issue 97002 ***