Check for white space at end of value

Below is the code that I wrote to find white space at the end of a string. If there is a space at the end then the variable 'Space' will have a value of 'space' for that record. I have added one single extra space at the end. But, the below code is not catching it.

Space := '';


if visit eq '' then Space := Space;
else if visit rlike '\\s\\\$' then Space := Space. ' space';
 
else Space := Space;

end if;
 

end if;

There is a white space at the end of the 'Arm A End of Treatment '. It's a CSV file read into Pipeline Pilot using Excel Reader(Cross platform) component. Will appreciate any help. Thank you!