_TextEditor_Line.Purge (gb.form.editor)

Function Purge ( [ KeepComment As Boolean, KeepString As Boolean, Replace As String ] ) As String

Purge the line from its comments and/or strings, according to its highlighting.

  • If KeepComment is set, the comments are kept intact. Comments are the characters associated with Highlight.Comment or Highlight.Help styles.

  • If KeepString is set, the strings are kept intact. Strings are the characters associated with Highlight.String style.

  • Replace is the character that replaces the removed elements. By default it is a space.

If the line is not highlighted, then it is returned as is.