Changed the string length function.