6 kyu

Convert string to camel case

69,867 of 203,678jhoffner

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 Trained500906
Total Skips52427
Total Code Submissions828526
Total Times Completed203678
JavaScript Completions69867
CoffeeScript Completions163
Ruby Completions5261
Haskell Completions1238
Python Completions66310
C# Completions13110
C++ Completions10561
Java Completions24092
Elixir Completions522
R Completions253
Objective-C Completions37
PHP Completions5599
Go Completions3877
PowerShell Completions129
Julia Completions111
Kotlin Completions2001
Scala Completions624
F# Completions72
Factor Completions13
Lua Completions128
Rust Completions1145
COBOL Completions19
Crystal Completions15
C Completions1299
TypeScript Completions1032
Total Stars3406
% of votes with a positive feedback rating88% of 16985
Total "Very Satisfied" Votes13322
Total "Somewhat Satisfied" Votes3343
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