String-functions without using library functions