add string formating function to my js library