Source::TrimSpan Method (TextSpan)

 

Adjusts the given span to skip leading and trailing whitespace.

Namespace:   Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService.14.0 (in Microsoft.VisualStudio.Package.LanguageService.14.0.dll)

public:
void TrimSpan(
	TextSpan% span
)

Parameters

span
Type: Microsoft.VisualStudio.TextManager.Interop::TextSpan

[in, out] A TextSpan object representing the span to modify. Returns the adjusted span.

This method examines the given span and adjusts the start and end points to skip all whitespace from the beginning and the end of the span, returning the extent of the modified span. This is used primarily by the UncommentSpan method before uncommenting a block comment.

Return to top
Show: