String.toDashCase Method
Returns a string formatted with dashes.
object.toDashCase ()
Arguments
- object
- Required. Always the name of a String object.
Return Value
The String.toDashCase method returns a copy of the string formatted with dashes.
Remarks
The following example illustrates the use of the String.toDashCase 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
|