str2d.Str2D.replace

Str2D.replace(old: str, new: str) Str2D[source]

Replace the data.

Parameters:
  • old (str) – The string to replace.

  • new (str) – The string to replace with.

Returns:

A new Str2D object with the data replaced.

Return type:

Str2D

Raises:

ValueError – If the length of the old and new strings are not the same.