IBodyRegion module

class IBodyRegion.IBodyRegion

Bases: IDocumentObject

Represents a body region in a document.

Replace

Replaces occurrences of a given string with a replacement string in the body region.

Parameters:
  • given (str) – The string to be replaced.

  • replace (str) – The replacement string.

  • caseSensitive (bool) – Specifies whether the replacement should be case-sensitive.

  • wholeWord (bool) – Specifies whether the replacement should be done only for whole words.

Returns:

The number of replacements made.

Return type:

int