Moved string-related functions into module 'stringtools.py'