I want a string entered should be converted to sentence case in whatever case it is.
Like
hi all, this is derp. thank you all to answer my qu
Try this, It will work fine for you. It will also work for String having leading spaces.
var string="hi all, this is derp. thank you all to answer my query."; var n=string.split("."); var vfinal="" for(i=0;i