Convert input to lowercase,
Split input on spaces,
Remove any empty values,
Convert all elements to buffers so they are mutable,
Replace the first character of each element with it's uppercase varient,
Convert the buffers back to strings,
Join the elements back to one variable.