Résumé : Jet fragmentation in pp and PbPb collisions at a centre-of-mass energy of 2.76TeV per nucleon pair was studied using data collected with the CMS detector at the LHC. Fragmentation functions are constructed using charged-particle tracks with transverse momenta pT > 4 GeV/c for dijet events with a leading jet of pT > 100 GeV/c. The fragmentation functions in PbPb events are compared to those in pp data as a function of collision centrality, as well as dijet-pT imbalance. Special emphasis is placed on the most central PbPb events including dijets with unbalanced momentum, indicative of energy loss of the hard scattered parent partons. The fragmentation patterns for both the leading and subleading jets in PbPb collisions agree with those seen in pp data at 2.76TeV. The results provide evidence that, despite the large parton energy loss observed in PbPb collisions, the partition of the remaining momentum within the jet cone into high-pT particles is not strongly modified in comparison to that observed for jets in vacuum.