#JavaScript (ES6), 58 56 bytes
JavaScript (ES6), 58 56 bytes
Saved 2 bytes thanks to @l4m2 / @Downgoat
Takes input in currying syntax (s)(c).
s=>c=>s.replace(u=/./g,x=>u=x==c?'':u?x:x.toUpperCase()) ###Commented
Commented
s => c => // given s and c s.replace(u = /./g, x => // initialize u to a RegExp; replace each character x in s with, u = // and update u to: x == c ? // if x is the separator: '' // an empty string : // else: u ? // if u is not an empty string: x // x unchanged : // else: x.toUpperCase() // x capitalized ) // end of replace()