questa funzione serve a processare alcuni messaggi postati da utenti ed evitare che alla fine siano presenti spazi o a capo inutili

funziona solo per l'ultimo elemento, ho provato a renderla ricorsiva (riga commentata) ma mi da come errore "Out of stack"

dov'è che sbaglio?

codice:
 
Function right_trim_post(stringa)
	
	dim RTP_temp
	
	RTP_temp = stringa
	
	If Right(RTP_temp, 6) = "
" then RTP_temp = Left(RTP_temp, (Len(RTP_temp) - 6))
	If Right(RTP_temp, 6) = "" then RTP_temp = Left(RTP_temp, (Len(RTP_temp) - 6))
	If Right(RTP_temp, 1) = " " then RTP_temp = Left(RTP_temp, (Len(RTP_temp) - 1))
	
'	RTP_temp = right_trim_post(RTP_temp)

	
	right_trim_post = RTP_temp

End Function