Aspose.Words.Examples.CSharp.Programming_Documents.Find_and_Replace.ReplaceTextWithFieldHandler.SplitRun C# (CSharp) Метод

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

Splits text of the specified run into two runs. Inserts the new run just after the specified run.
private SplitRun ( Run run, int position ) : Run
run Run
position int
Результат Run
        private Run SplitRun(Run run, int position)
        {
            Run afterRun = (Run)run.Clone(true);
            afterRun.Text = run.Text.Substring(position);
            run.Text = run.Text.Substring(0, position);
            run.ParentNode.InsertAfter(afterRun, run);
            return afterRun;

        }