ICSharpCode.NRefactory.CSharp.TextWriterTokenWriter.UpdateEndLocation C# (CSharp) Method

UpdateEndLocation() static private method

static private UpdateEndLocation ( string content, int &line, int &column ) : void
content string
line int
column int
return void
		static void UpdateEndLocation(string content, ref int line, ref int column)
		{
			if (string.IsNullOrEmpty(content))
				return;
			for (int i = 0; i < content.Length; i++) {
				char ch = content[i];
				switch (ch) {
					case '\r':
						if (i + 1 < content.Length && content[i + 1] == '\n')
							i++;
						goto case '\n';
					case '\n':
						line++;
						column = 0;
						break;
				}
				column++;
			}
		}