CSharpUML.ClassDiagram.EscapeLines C# (CSharp) Метод

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

private EscapeLines ( string line, int lineLength ) : string
line string
lineLength int
Результат string
        private string EscapeLines(string line, int lineLength)
        {
            string[] parts = line.Trim ().Split (" ");
            string escaped = "";
            bool first = true;
            int length = 0;
            foreach (string part in parts) {
                if (!first) {
                    escaped += " ";
                    length += 1;
                }
                escaped += Escape (part);
                length += part.Length;
                first = false;

                if (length > lineLength) {
                    escaped += "\\l";
                    length = 0;
                    first = true;
                }
            }
            escaped += "\\l";
            return escaped;
        }