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.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hyphenate instead of Dasherize makes more sense.
We cannot remove Dasherize but we could add Hyphenate method that calls Dasherize.
Also the code explains it better:
/// <summary>/// Replaces underscores with dashes in the string/// </summary>/// <param name="underscoredWord"></param>/// <returns></returns>publicstaticstringDasherize(thisstringunderscoredWord){returnunderscoredWord.Replace('_','-');}/// <summary>/// Replaces underscores with hyphens in the string/// </summary>/// <param name="underscoredWord"></param>/// <returns></returns>publicstaticstringHyphenate(thisstringunderscoredWord){returnDasherize(underscoredWord);}
Is there a difference between Dasherize and Hyphenate?
If not, how can I convert a string like "ThisIsMyString" to "this-is-my-string"? Should I do something like this
"ThisIsMyString".Underscore().Hyphenate()
?
The text was updated successfully, but these errors were encountered: