The jet fragmentation function of inclusive jets with transverse momentum ${p}_{\mathrm{T}}$ above $100\phantom{\rule{0.28em}{0ex}}\text{GeV}/c$ in PbPb collisions has been measured using reconstructed charged particles with ${p}_{\mathrm{T}}$ above $1\phantom{\rule{0.28em}{0ex}}\text{GeV}/c$ in a cone of radius 0.3 around the jet axis. A data sample of PbPb collisions collected in 2011 at a nucleon-nucleon center-of-mass energy of $\sqrt{{s}_{{}_{\mathit{NN}}}}=2.76\phantom{\rule{0.28em}{0ex}}\text{TeV}$ corresponding to an integrated luminosity of $150\phantom{\rule{0.28em}{0ex}}\ensuremath{\mu}{\mathrm{b}}^{\ensuremath{-}1}$ is used. The results for PbPb collisions as a function of collision centrality and jet transverse momentum are compared to reference distributions based on $\mathit{pp}$ data collected at the same center-of-mass energy in 2013, with an integrated luminosity of $5.3\phantom{\rule{0.28em}{0ex}}{\text{pb}}^{\ensuremath{-}\text{1}}$. A centrality-dependent modification of the fragmentation function is found. For the most central collisions, a significant enhancement is observed in the PbPb/$\mathit{pp}$ fragmentation function ratio for charged particles with ${p}_{\mathrm{T}}$ less than $3\phantom{\rule{0.28em}{0ex}}\text{GeV}/c$. This enhancement is observed for all jet ${p}_{\mathrm{T}}$ bins studied.