SILUBS.ScriptureChecks.QuotationMarkCategorizer.Level C# (CSharp) Method

Level() private method

Gets the level of the specified quotaion mark.
private Level ( string qmark, int expectedLevel ) : int
qmark string The mark to get the level of
expectedLevel int The level that the mark is expected to have. This level /// is checked first.
return int
		internal int Level(string qmark, int expectedLevel)
		{
			if (expectedLevel > 0 && expectedLevel <= m_quoteMarks.Levels)
			{
				// Check the expected level first. If it matches the opening or the closing, then
				// the expected level is considered to be the level of the mark.
				if (m_quoteMarks[expectedLevel - 1].Opening == qmark ||
					m_quoteMarks[expectedLevel - 1].Closing == qmark)
					return expectedLevel;
			}

			for (int i = 0; i < m_quoteMarks.Levels; i++)
			{
				if (qmark == m_quoteMarks[i].Opening || qmark == m_quoteMarks[i].Closing)
					return i + 1;
			}

			return 0;
		}

Same methods

QuotationMarkCategorizer::Level ( string qmark, int startingLevel, bool fSearchForward ) : int