Description

In the next example, the replacement begins four characters from the end, and replaces two characters in the variable with a four-character string: CD is replaced with XXYY. This would yield "ABXXYYEF".

Syntax

STRING = "ABCDEF"

STRING[-4,2] = "XXYY"

  • No labels