Function Reference

StringTrimRight

Trims a number of characters from the right hand side of a string.

StringTrimRight ( "string", count )

 

Parameters

string The string to evaluate.
count The number of characters to trim.

 

Return Value

Returns the string trimmed by count characters from the right.

 

Remarks

If count is out-of-bounds, an empty string is returned.
StringTrimRight($str, $n) is functionally equivalent to StringLeft($str, StringLen($str) - $n)

 

Related

String, StringInStr, StringLeft, StringLen, StringLower, StringMid, StringRight, StringTrimLeft, StringUpper

 

Example


$result = StringTrimRight("I am a string", 3)
MsgBox(0, "String without rightmost 3 characters is:", $result)