replace function `:truncateLeading2` for language :java8