:unittest.rTrim :$created 20080227 :$changed 20080227 :$source https://www.dostips.com for %%C in ( " right trim nothing" " right trim one " " right trim plenty " ) do ( set "s=%%~C" call:rTrim s call:Format "[35] [35]." "'%%~C'" "'%%s%%'" ) EXIT /b
Script Output:
Script Output
---- :unittest.rTrim - output
' right trim nothing' ' right trim nothing' .
' right trim one ' ' right trim one' .
' right trim plenty ' right trim plenty' .
----