Create a method or function that converts dash (-
) or underscore (_
) delimited words into camel case. The solution must handle capitalization according to the rules below:
- The first word in the output should only be capitalized if the original word was capitalized (this is known as Upper Camel Case or Pascal Case).
- Every word after the first should always have its first letter capitalized.
| Input | Output |