I don't know of any methods specifically related to URLs, though you can check the Javadocs for the UtilMethods viewtool to see if there's anything in there.
But Velocity is just a thin layer over Java, and Velocity objects are just Java objects under the covers. So, you can use Java string methods, including string replace. This would look something like #set( $newString = $oldString.replace("/oldPart/", "/newPart/") ).
Disclaimer: I make no guarantee that the above syntax is correct, since I haven't done this in quite a while. But it will should something like that.