refact string helper