-
Notifications
You must be signed in to change notification settings - Fork 1
TrimStart
jdubs edited this page Oct 21, 2016
·
1 revision
Trims specified characters from the beginning of a variable value
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.
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 "23423423111".
public static void TrimStart(string SpecName, object Characters, object ErrorMessage)
{
Break();
try
{
var text = Variable(SpecName).Value;
Variable(SpecName).Value = text.TrimStart(((string)Characters).ToCharArray());
}
catch (Exception ex)
{
throw new Four51ActionsException(ex.Message, (string)ErrorMessage);
}
}