LastPositionIndex

jdubs edited this page Oct 21, 2016 · 1 revision

Table of Contents

Overview

Returns the result of a number comparison.

Parameters

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

Text (multiple) The variable containing the text to examine for the character

CharacterToFind (constant) The variable containing the character to find in the text

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

Synopsis

This method searches the variable for the last instance of the search character. For example, if you search for the letter "r" in "We are Four51" the returned value will be 11.

Source Code

public static void LastPositionIndex(string SpecName, object Text, object CharacterToFind, object ErrorMessage)
{
	Break();
	try
	{
		Variable(SpecName).Value = Text.ToString().LastIndexOf((string)CharacterToFind).ToString();
	}
	catch (Exception ex)
	{
		throw new Four51ActionsException(ex.Message, (string)ErrorMessage);
	}
}

Referenced Methods

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.