Is there a standard Elisp function which can return as a substring (without any of the text-properties) the characters from the current position of point to the last nonwhite space character on that line.
For instance if the line is
Hello World and the point is on
W it should return
Note in particular, if the line contains at least one non-whitespace character, I want everything only upto the last non-whitespace character.
If a line is blank or contains only white space characters I would like the function to return