trim string by property change comparison