IR Framework

String.toSentenceCase Method

Returns a string formatted in sentence case.
object.toSentenceCase ()

Arguments

object
Required. Always the name of a String object.



Return Value

The String.toSentenceCase method returns a copy of the string formatted in sentence case.

Remarks

The following example illustrates the use of the String.toSentenceCase method.

var s = "QuarterlyExpenditureAmount";
Console.Writeln(s.toCamelCase());	//	quarterlyExpenditureAmount
Console.Writeln(s.toDashCase());	//	Quarterly-Expenditure-Amount
Console.Writeln(s.toPascalCase());	//	QuarterlyExpenditureAmount
Console.Writeln(s.toProperCase());	//	Quarterly Expenditure Amount
Console.Writeln(s.toSentenceCase());	//	Quarterly expenditure amount
Console.Writeln(s.toUnderscoreCase());	//	Quarterly_Expenditure_Amount

s = "Quarterly_expenditure  -amount";
Console.Writeln(s.toCamelCase());	//	quarterlyExpenditureAmount
Console.Writeln(s.toDashCase());	//	Quarterly-expenditure-amount
Console.Writeln(s.toPascalCase());	//	QuarterlyExpenditureAmount
Console.Writeln(s.toProperCase());	//	Quarterly Expenditure Amount
Console.Writeln(s.toSentenceCase());	//	Quarterly expenditure amount
Console.Writeln(s.toUnderscoreCase());	//	Quarterly_expenditure_amount


Requirements