Bug #28

Fixing a bug in Strings.Replace in case of truncation

Added by J. Templ almost 5 years ago. Updated almost 5 years ago.

Status:ClosedStart date:01/30/2015
Priority:NormalDue date:
Assignee:J. Templ% Done:

100%

Category:-
Target version:1.7
Forum topic:

Description

Strings.Replace does not terminate the resulting string with 0X if truncation is needed.
For example: VAR a: ARRAY 5 OF CHAR; a := "ABCD"; Strings.Replace(a, 1, 1, "xy");
Reported by Manuel Martín Sánchez on 2014-03-21.
In addition, the simple case where the string length is not changed should be optimized.

Refers to CPC 1.7 rc5 change list number 30.

Associated revisions

Revision 40976188
Added by J. Templ almost 5 years ago

Fixing a bug in Strings.Replace in case of truncation. Refs: #28.
Bug fix as proposed by Manuel Martín Sánchez in CPC 1.7 rc5.

Signed-off-by: Josef Templ <>

Revision 8e4c3a13
Added by J. Templ almost 5 years ago

Optimizing the case where the string length is unchanged. Refs: #28.
In that case there is no need to shift the right part to the right by zero characters.

Signed-off-by: Josef Templ <>

Revision e16a19d3
Added by J. Templ almost 5 years ago

Merge pull request #15 from BlackBoxCenter/issue-#28

Refs: #28.

History

#1 Updated by I. Denisov almost 5 years ago

  • Description updated (diff)

#2 Updated by J. Templ almost 5 years ago

  • Description updated (diff)
  • Status changed from New to Closed
  • Assignee set to J. Templ
  • Target version set to 1.7
  • % Done changed from 0 to 100

Also available in: Atom PDF