Trimming text content for primitives.