String.toUnderscoreCase Method
Returns a string formatted with underscores.
object.toUnderscoreCase ()
Arguments
- object
- Required. Always the name of a String object.
Return Value
The String.toUnderscoreCase method returns a copy of the string formatted with underscores.
Remarks
The following example illustrates the use of the String.toUnderscoreCase method.
var s = "QuarterlyExpenditureAmount";
Console.Writeln(s.toCamelCase());
Console.Writeln(s.toDashCase());
Console.Writeln(s.toPascalCase());
Console.Writeln(s.toProperCase());
Console.Writeln(s.toSentenceCase());
Console.Writeln(s.toUnderscoreCase());
s = "Quarterly_expenditure -amount";
Console.Writeln(s.toCamelCase());
Console.Writeln(s.toDashCase());
Console.Writeln(s.toPascalCase());
Console.Writeln(s.toProperCase());
Console.Writeln(s.toSentenceCase());
Console.Writeln(s.toUnderscoreCase());
Requirements