Does anyone know how to create a function which accepts a string and capitalizes the first letter in each word of the string, but also forces the other letters to be lowercase?
Any advice would be greatly appreciated!!
This is my attempt so far:
str=['this is a TEST']; for i=1:length(str); if str(1,i(1)); str= upper(str); else str(1,i); str= lower(str); end end
Best Answer