receives the hash of the name with the id, then return to truncate the ending while maintaining the uniqueness.