Druva interview question

coding Q.-String character count and putting that into a new string