Mono.TextEditor.TextViewMargin.GetWidth C# (CSharp) Method

GetWidth() public method

public GetWidth ( string text ) : int
text string
return int
		public int GetWidth (string text)
		{
			text = text.Replace ("\t", new string (' ', textEditor.Options.TabSize));
			defaultLayout.SetText (text);
			int width, height;
			defaultLayout.GetPixelSize (out width, out height);
			return width;
		}