Instead of manipulating the string content of the document to remove the feature, I directly used the deleteString method of the Document class.
The lineStartOffset and lineEndOffset are calculated based on the line numbers of the feature's text offset, ensuring the deletion of the entire line where the feature is located, regardless of its length or content.
Instead of manipulating the string content of the document to remove the feature, I directly used the deleteString method of the Document class.
The lineStartOffset and lineEndOffset are calculated based on the line numbers of the feature's text offset, ensuring the deletion of the entire line where the feature is located, regardless of its length or content.