AvalonStudio.TextEditor.Document.TextUtilities.GetWhitespaceAfter C# (CSharp) Method

GetWhitespaceAfter() private method

private GetWhitespaceAfter ( ITextSource textSource, int offset ) : ISegment
textSource ITextSource
offset int
return ISegment
		public static ISegment GetWhitespaceAfter(ITextSource textSource, int offset)
		{
			if (textSource == null)
				throw new ArgumentNullException("textSource");
			int pos;
			for (pos = offset; pos < textSource.TextLength; pos++)
			{
				var c = textSource.GetCharAt(pos);
				if (c != ' ' && c != '\t')
					break;
			}
			return new SimpleSegment(offset, pos - offset);
		}