Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - rtrim() remove trailing spaces from a string http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 rtrim()             Remove trailing spaces from a string
------------------------------------------------------------------------------
 Declaration
   string.hdr

 Syntax
   func char rtrim extern
   param const char cString

 Arguments
   cString is a character string.

 Return
   A string derived from the input string with trailing spaces remcved.

 Description
   The rtrim() function returns the result of removing all trailing blanks
   from cString.

 Example
   #define EXAMPLE_STRING
   #include example.hdr

   proc Test_rtrim
   ? len( rtrim( "   " ) )                              // prints 0
   ? ">" + rtrim( "Megan Morse  " ) + "<"               // "Megan Morse"
   ? ">" + rtrim( "  My Name " ) + "<"                  // "  My Name"
   ? ">" + rtrim( ltrim( "  My Name " ) ) + "<        " // "My Name"
   ? ">" + rtrim( "A long string with spaces" + space( 50 ) ) + "<"
   endproc

   proc main
   Test_rtrim()
   endproc

See Also: alltrim() ltrim() trim()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson