Related: #i94895# revert the part of revision 1650261

replaced string should be starting with the start postion if specified

(cherry picked from commit 68c6265584fb6cb0469098507dd287e6e1127324)

Conflicts:
	basic/source/runtime/methods.cxx

Change-Id: Ib729facfa78ffddebc258440324f05d037fae46f
This commit is contained in:
Tsutomu Uchino
2015-01-11 02:53:26 +00:00
committed by Caolán McNamara
parent 5e6a4591d3
commit bf964151a7
2 changed files with 2 additions and 2 deletions

View File

@@ -37,7 +37,7 @@ Function verify_testReplace() as String
retStr = Replace(srcStr, destStr, repStr, compare:=vbTextCompare)
TestLog_ASSERT retStr = "aefefdef", "text compare:" & retStr
retStr = Replace(srcStr, destStr, repStr, 3, -1, vbBinaryCompare)
TestLog_ASSERT retStr = "abcefdBc", "start = 3:" & retStr
TestLog_ASSERT retStr = "cefdBc", "start = 3:" & retStr
retStr = Replace(srcStr, destStr, repStr, 1, 2, vbBinaryCompare)
TestLog_ASSERT retStr = "aefefdBc", "count = 2: " & retStr
retStr = Replace(srcStr, destStr, repStr, 1, 0, vbBinaryCompare)

View File

@@ -1414,7 +1414,7 @@ RTLFUNC(Replace)
}
}
}
rPar.Get(0)->PutString( aExpStr );
rPar.Get(0)->PutString( aExpStr.copy( lStartPos - 1 ) );
}
}