String format function implemented