split and capitalize

Challenge :
Given a string split at specific positions and capitalize the first character of the given word. Capitalize the first word's first char if and only if it was already capitalized
Input :
A string s and a character c.
Ouput :
The string with each occurrence of c replaced with the first char capitalized
Examples :
Hello_world , _                 ---> HelloWorld
me,no,like, ,                   ---> meNoLike
you-got-it, -                   ---> youGotIt
Am^I^clear, ^                   ---> AmIClear
go!full!caps, !                 ---> goFullCaps
weird&but&tRue, &               ---> weirdButTRue
ProbleM1fixed1no,1              ---> ProbleMFixedNo
!prob!!lem!s!Olved!!            ---> ProbLemSOlved
Note :
Given input will always be valid. i.e : The first will always be a string with at least one instance of the character to replace at. The second will always will be a single character.
The length of the input string will be greater 4.
There will be at least one occurrence of the character to split at.
The input is guaranteed to contain only letters and the separator (Thanks @Arnauld)
You are required to take both inputs and not the string alone.
Separator is anything that is not an alphabet (a-z / A-Z) (suggested by @Dennis)
Winning criteria :
This is code-golf so shortest code in bytes for each language wins.
Thanks to @JonathanAllan for pointing out two mistakes.

Комментарии

Популярные сообщения из этого блога

Как преобразовать вертикальную запись в горизонтальную?

Skipping acquire of configured file 'contrib/binary-i386/Packages' as repository … doesn't support architecture 'i386'

How to delete a folder in remote Windows from Linux