make StmUrlBuilder build_url function remove trailling whitespace
as it could lead to bad link creation. the change does not
alter the original string as its a const and we don't own it,
instead the format specifier expects to get the string length.
Since we are walking backwards and the epos pointer ends in the last
valid string character, due to this +1 is added when counting end-start.