AppKit.TextKit.Formatter.SourceTextView.DecreaseTabIndent C# (CSharp) Метод

DecreaseTabIndent() приватный Метод

Decreases the tab indent for the given text
private DecreaseTabIndent ( string text ) : string
text string The text to outdent.
Результат string
		private string DecreaseTabIndent(string text) {
			var output = "";
			var found = false;
			var consume = true;

			// Add first intent
			for (int n = 0; n < text.Length; ++n) {
				var c = text [n];
				found = (c == Formatter.Newline || c == Formatter.LineSeparator || c == Formatter.ParagraphSeparator); 

				// Include char in output?
				if ((int)c == TabKey && consume) {
					consume = false;
				} else {
					output += c;
				}

				// Decrease tab level?
				if (found) {
					// Yes
					consume = true;
				}
			}

			// Return results
			return output;
		}
		#endregion