Skip to content

TrimEnd

jdubs edited this page Oct 21, 2016 · 1 revision

Table of Contents

Overview

Trims specified characters from the end of a variable value

Parameters

SpecName (multiple) The name of the variable for operation result assignment

Characters (multiple) The variable containing the number of total characters

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

Synopsis

The Characters parameter can be a grouping of characters. It is not limited to just one. For example: If you specify to trim "01" from the value "0023423423111" the result will be "0023423423".

Source Code

public static void TrimEnd(string SpecName, object Characters, object ErrorMessage)
{
	Break();
	try
	{
		var text = Variable(SpecName).Value;
		Variable(SpecName).Value = text.TrimEnd(((string)Characters).ToCharArray());
	}
	catch (Exception ex)
	{
		throw new Four51ActionsException(ex.Message, (string)ErrorMessage);
	}
}

Referenced Methods

Clone this wiki locally