rtrim

Overview

The rtrim function removes all the extra white spaces (if any) inserted after the input text and returns the trimmed text.

Return Type

  • TEXT

Syntax

<variable> = <input_text>.rtrim();

(OR)

<variable> = rtrim(<input_text>);

where,

ParameterData typeDescription
<variable>TEXTVariable that will hold the trimmed text
<text1>TEXT

The input text whose trailing white spaces need to be removed

Examples

 text = "   Zoho Deluge   ";
 result = text.rtrim(); // returns "   Zoho Deluge"
 
​ text_size = text.length(); // returns 17
 result_size = result.length(); // returns 14
 
Note: The length built-in function returns the number of characters in the input text.