6 kyu

Convert string to camel case

24,155 of 204,411jhoffner

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 Trained502725
Total Skips52553
Total Code Submissions830639
Total Times Completed204411
JavaScript Completions70123
CoffeeScript Completions163
Ruby Completions5267
Haskell Completions1240
Python Completions66581
C# Completions13139
C++ Completions10603
Java Completions24155
Elixir Completions523
R Completions254
Objective-C Completions37
PHP Completions5605
Go Completions3892
PowerShell Completions131
Julia Completions111
Kotlin Completions2006
Scala Completions624
F# Completions72
Factor Completions13
Lua Completions130
Rust Completions1153
COBOL Completions19
Crystal Completions15
C Completions1317
TypeScript Completions1067
Total Stars3413
% of votes with a positive feedback rating88% of 17028
Total "Very Satisfied" Votes13358
Total "Somewhat Satisfied" Votes3350
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