IEditorOperations.DeleteHorizontalWhiteSpace Method

Definition

Deletes all white space from the beginnings and ends of the selected lines, and trims internal white space.

public:
 bool DeleteHorizontalWhiteSpace();
public:
 bool DeleteHorizontalWhiteSpace();
bool DeleteHorizontalWhiteSpace();
public bool DeleteHorizontalWhiteSpace ();
abstract member DeleteHorizontalWhiteSpace : unit -> bool
Public Function DeleteHorizontalWhiteSpace () As Boolean

Returns

true if the edit succeeded, otherwise false.

Remarks

The algorithm for this operation follows these rules:

If there is no selection, the white space around the caret is trimmed so that only one space or tab remains. If there is only one space or tab, then this operation does nothing.

If there is a selection, then the white space at the beginning or end of a line contained within the selection is completely deleted. If there is at least one block of contiguous white space longer than one character in the selection, then all white space between the first and last non-white space characters is trimmed so that only one space or tab remains for each contiguous block. If there are only contiguous runs of a single space or tab contained within the selection, then all spaces and tabs in the selection are deleted.

Applies to