Home
XtGem-
Templates-
XtScript-
Translate this page
Unavailable
Microsoft
®
Translator
Check out this page in {0} translated from {1}
translated from
Original:
Translated:
Automatic translation powered by Microsoft® Translator
Start translating
Stop translating
Close
Close and show original page
Select
Main Index
Predefined Functions
Scripts
Xtforum post
Short Url
rtrim
Remove whitespace (or other characters) from the end of a string
[...] = optional ... = your value
[var $... = ]call rtrim $val=…[;$charlist=…]
Example code
Show as text
<!--parser:xtscript--> #assign a space to a variable var $space =call chr $val=32 var $input =xyz FOOBAR zyx var $input =$space$input$space # default rtrim var $output = call rtrim $val=$input print default rtrim<br /> print input =|$input|<br /> print output =|$output|<hr /> # a space can be added (not at the end) as a part of a $charlist of 2 or more characters var $output = call rtrim $val=$input ; $charlist=xy z print a space in the charlist<br /> print input = |$input|<br /> print output = |$output|<hr /> # specify a range of characters with .. var $input = ABCDEFGHIJKLMABCDEF var $output = call rtrim $val=$input ; $charlist= A..F J..M print trim a range of characters<br /> print input = $input<br /> print output = $output <!--/parser:xtscript-->
Show as text
Example output
Reload
default rtrim
input =| xyz FOOBAR zyx |
output =| xyz FOOBAR zyx|
a space in the charlist
input = | xyz FOOBAR zyx |
output = | xyz FOOBAR|
trim a range of characters
input = ABCDEFGHIJKLMABCDEF
output = ABCDEFGHI
Related pages
ltrim
trim
str_pad
Quick index
abs
addslashes
base64_decode
base64_encode
bin2hex
br2nl
ceil
chr
crc32
dechex
floor
hex2bin
hexdec
htmlspecialchars
lcfirst
ltrim
md5
mt_rand
nl2br
ord
pi
pow
rawurldecode
rawurlencode
round
rtrim
sha1
str_ireplace
str_pad
str_repeat
str_replace
str_shuffle
strip_tags
stripos
stripslashes
stristr
strlen
strpos
strrchr
strrev
strripos
strrpos
strstr
strtolower
strtoupper
substr
trim
ucfirst
ucwords
urldecode
urlencode
About us
Contact
Forum