We presents a semi-phenomenological analysis of the stellar mass fraction that galaxies lose to the intracluster light (ICL) through tidal stripping since entering the group/cluster environment. The stellar mass stripped from galaxies is at least as large as the difference between the stellar mass at the time of entry and that at z = 0. We estimate the former from stellar mass – halo mass relation at the redshift of entry and the latter by matching the conditional stellar mass function of satellite galaxies and the conditional mass function of dark matter subhaloes for a same group mass. To follow the positions and merging histories of galaxies within groups and clusters from the redshift of entry to z = 0, we track haloes and subhaloes in a cosmological N-body simulation. When a subhalo falls under the resolution of the halo finder, its trajectory is computed by integrating equations of motion that include dynamical friction. We are thus able to distinguish between continued mass accretion, tidal stripping, and starvation and find that the respective roles these processes depends critically on group/cluster mass. The results are compared with observations of group mass functions.