TitleCase

jdubs edited this page Oct 21, 2016 · 1 revision

Table of Contents

Overview

Converts all words to Title Case.

Parameters

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

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

Synopsis

This method simply converts the first letter of all words to upper case.

Source Code

public static void TitleCase(string SpecName, object ErrorMessage) {
	Break();
	try {
		var val = Variable(SpecName).Value;
		CultureInfo info = Thread.CurrentThread.CurrentCulture;
		TextInfo text = info.TextInfo;
		Variable(SpecName).Value = text.ToTitleCase(val);
	}
	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.