Skip to content

InsertText

jdubs edited this page Oct 21, 2016 · 1 revision

Table of Contents

Overview

Inserts text, at the supplied position, in the supplied variable value.

Parameters

SpecName (constant) The variable containing the text to format.

Position (multiple) The index or position where the text is inserted.

Text (multiple) The value containing the text to insert.

ErrorMessage (multiple | optional) The error message to return when any error occurs.

Synopsis

This method locates the index supplied and inserts the text into the value. For example, if you supplied a Position of 12 and text " x1234" the value "321.654.9877" would be returned as "321.654.9877 x1234".

Source Code

public static void InsertText(string SpecName, object Position, object Text, object ErrorMessage)
{
	Break();
	try
	{
		Variable(SpecName).Value = Variable(SpecName).Value.Insert((int)N(Position), (string)Text);
	}
	catch (Exception ex)
	{
		throw new Four51ActionsException(ex.Message, (string)ErrorMessage);
	}
}

Referenced Methods

Clone this wiki locally