Andreas's decision is basically the right one. I just add more info.
I'm not sure what you use cropping for, but
1) if you are trying to include it in a statement:
expect(rows.get(9).getText()).toMatch('\s*STRING_TO_MATCH\s*')
or simply
expect(rows.get(9).getText()).toContain('STRING_TO_MATCH')
2) If you need a promise that returns a trimmed value
var columnvalue=rows.get(9).getText(); var columnvalue1=columnvalue.then(function(text) {return text.trim();})
source share