Bug 65230

Summary: TRIM function: implementation incomplete
Product: POI Reporter: gerard.duong
Component: SS CommonAssignee: POI Developers List <dev>
Severity: minor    
Priority: P2    
Version: 5.0.0-FINAL   
Target Milestone: ---   
Hardware: All   
OS: All   

Description gerard.duong 2021-04-09 08:56:29 UTC
The current implementation of the TRIM function just "String.trim()" the input. This is not enough.

Indeed, a quick test within Excel of Office 365, shows that this function also reduces duplicated spaces between words to simple ones.
So this behavior should be replicated within the TextFunction class.

Test case:
Just add the following line in TestTrim.testBasic():
confirmTrim(new StringEval("hi  there"), "hi there");

This bug applies to the 4.1.2-FINAL version too.

On a sidenote, the online documentation does not mention this specific behavior:
I have sent them a feedback on this matter.
The inline documentation is fortunately correct, at least the French one.
Comment 1 PJ Fanning 2021-07-28 13:18:46 UTC
change made in r1891851
Comment 2 PJ Fanning 2021-07-28 13:19:08 UTC
change made in r1891851