Google like converter with length

Not completely satisfied, is there anyway i can improve my code to make it more compact and easy for user uses?