6 kyu

Convert string to camel case

70,058 of 204,259jhoffner

Description:

Complete the method/function so that it converts dash/underscore delimited words into camel casing. The first word within the output should be capitalized only if the original word was capitalized (known as Upper Camel Case, also often referred to as Pascal case). The next words should be always capitalized.

Examples

"the-stealth-warrior" gets converted to "theStealthWarrior"

"The_Stealth_Warrior" gets converted to "TheStealthWarrior"

"The_Stealth-Warrior" gets converted to "TheStealthWarrior"

Regular Expressions
Algorithms
Strings

Stats:

CreatedApr 26, 2013
PublishedJul 25, 2013
Warriors Trained502379
Total Skips52522
Total Code Submissions830251
Total Times Completed204259
JavaScript Completions70058
CoffeeScript Completions163
Ruby Completions5267
Haskell Completions1240
Python Completions66534
C# Completions13132
C++ Completions10590
Java Completions24145
Elixir Completions523
R Completions253
Objective-C Completions37
PHP Completions5605
Go Completions3890
PowerShell Completions131
Julia Completions111
Kotlin Completions2006
Scala Completions624
F# Completions72
Factor Completions13
Lua Completions130
Rust Completions1148
COBOL Completions19
Crystal Completions15
C Completions1313
TypeScript Completions1065
Total Stars3412
% of votes with a positive feedback rating88% of 17020
Total "Very Satisfied" Votes13353
Total "Somewhat Satisfied" Votes3347
Total "Not Satisfied" Votes320
Ad
Contributors
  • jhoffner Avatar
  • bkaes Avatar
  • GiacomoSorbi Avatar
  • CalculusBear Avatar
  • anter69 Avatar
  • brunolm Avatar
  • MFreidank Avatar
  • donaldsebleung Avatar
  • Chrono79 Avatar
  • JohanWiltink Avatar
  • davejones Avatar
  • Blind4Basics Avatar
  • mmalkavian Avatar
  • rowcased Avatar
  • mentalplex Avatar
  • kdmatrosov Avatar
  • tebek Avatar
  • particleflux Avatar
  • FArekkusu Avatar
  • Helge801 Avatar
  • monadius Avatar
  • gabriel2combe Avatar
  • hobovsky Avatar
  • Console Cowboy Avatar
  • xavierguihot Avatar
  • stellartux Avatar
  • solitude Avatar
  • akar-0 Avatar
  • BobtheLantern Avatar
  • Litoprobka Avatar
  • Wei-Ting Yang Avatar
  • Just4FunCoder Avatar
  • razetime Avatar
  • uninhm Avatar
  • KayleighWasTaken Avatar
  • JavaScripts Avatar
Ad