ProtocolBuffers.Code.Indent C# (CSharp) Method

Indent() public static method

Code.Indent all lines in the code string with given number of tabs
public static Indent ( int tabs, string code ) : string
tabs int
code string
return string
        public static string Indent(int tabs, string code)
        {
            string sep = "\n";
            for (int n = 0; n < tabs; n++)
                sep += "\t";
            code = sep + string.Join (sep, code.Split ('\n'));
            return code.Substring (1).TrimEnd ('\t');
        }

Same methods

Code::Indent ( string code ) : string