Skip to content

Superscript

jdubs edited this page Oct 21, 2016 · 1 revision

Table of Contents

Overview

Applies superscript attribute to specified text.

Parameters

SpecName (constant) The variable containing the text to format. Variable must be Formatted Text type.

Character (multiple) The character(s) to find and superscript.

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

Synopsis

Applicable for applying superscript attributes to specific subsets of text within variables. For example, you may specify "vs" as the superscript text in the Character parameter. If the user enters "Twins vs Royals" the method would apply the superscript attribute only to "vs" in the text.

Source Code

public static void Superscript(string SpecName, object Character, object ErrorMessage)
{
	Break();
	try
	{
		Variable(SpecName).Value = Variable(SpecName).Value.Replace((string)Character, String.Format("<_char supersub='superscript'>{0}</_char>", (string)Character));
	}
	catch (Exception ex)
	{
		throw new Four51ActionsException(ex.Message, (string)ErrorMessage);
	}
}

Referenced Methods

Clone this wiki locally