Adjusts the given span to skip leading and trailing whitespace.
Namespace: Microsoft.VisualStudio.Package
Assembly: Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Syntax
'宣言
Public Sub TrimSpan ( _
ByRef span As TextSpan _
)
'使用
Dim instance As Source
Dim span As TextSpan
instance.TrimSpan(span)
public void TrimSpan(
ref TextSpan span
)
public:
void TrimSpan(
TextSpan% span
)
public function TrimSpan(
span : TextSpan
)
Parameters
span
Type: Microsoft.VisualStudio.TextManager.Interop.TextSpan%[in, out] A TextSpan object representing the span to modify. Returns the adjusted span.
Remarks
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.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.