A determination of the fragmentation functions of u-quarks into charged pions