SIL.FieldWorks.UnicodeCharEditor.PUAInstaller.IncrementCount C# (CSharp) Method

IncrementCount() private static method

Given a line containing a valid code or code range, increments the count to include the code or code range. Uses XXXX..YYYY style range.
private static IncrementCount ( int &currentCount, string line ) : void
currentCount int The current count to increment
line string The DerivedBidiClass.txt style line to use to increment.
return void
		private static void IncrementCount(ref int currentCount, string line)
		{
			//Grab codepoint
			var code = line.Substring(0, line.IndexOf(';')).Trim();
			if (code.IndexOf('.') != -1)
			{
				//Grabs the end codepoint
				var endCode = code.Substring(code.IndexOf("..") + 2).Trim();
				code = code.Substring(0, code.IndexOf("..")).Trim();
				// Add all the characters in the range.
				currentCount += SubHex(endCode, code) + 1;
			}
			// we found another valid codepoint
			else
				currentCount++;
		}