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 - trim() remove trailing spaces from a string http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 trim()              Remove trailing spaces from a string
------------------------------------------------------------------------------
 Declaration
   string.hdr

 Syntax
   func char trim extern
   param const char cSource

 Arguments
   cSource is a character string.

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

 Description
   The trim() function returns cSource without any trailing blanks.

 Example
   #define EXAMPLE_STRING
   #include example.hdr

   proc Test_trim
   vardef
      char cString
   enddef
   cString := "  Hello world   "
   ? ">" + cString + "<"
   ? ">" + trim( cString ) + "<"
   endproc

   proc main
   Test_trim()
   endproc

See Also: alltrim() ltrim() rtrim()

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