s4_rtrim(string)

Removes trailing whitespace from string:

⇐ {s4_rtrim([String
⇐     ])}
⇒ {String}

Non-trailing (i. e. leading and inner) whitespace remains intact:

⇐ {s4_rtrim([
⇐     S  t  r
⇐     ing])}
⇒ {
⇒     S  t  r
⇒     ing}

Result is quoted:

⇐ {s4_rtrim([m4_toupper([String])])}
⇒ {m4_toupper([String])}

(Note: m4_toupper macro is not expanded.)