I would say that you are behind the documentation.
Your version 8.1.19-37 has a release date of 12/15/2019
AFAIK the online documentation is updated with the Git code and may be there before a release is done.
On Feb 13, 2020 (02/13/2020) format.pl was updated with trim_line/2
which also removed trim_spaces/2
(history)
Commit b392c20e58e77d729aa880c132d393ee7a58ec30
On Feb 15, 2020 (02/15/2020) Release 8.1.22 occurred with the changes to format.pl. In checking the notes the only related item I found is
AUTOLOAD: Support HTML to text conversion (lynx subdir of library).
Since SWI-Prolog is open source it was possible to find and put the details in this post.
Since my system has version 8.1.24
(03/04/2020) the changes made to format.pl are on my system.