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 - radjust() right-adjust a string http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 radjust()           Right-adjust a string
------------------------------------------------------------------------------
 Declaration
   string.hdr

 Syntax
   func char radjust extern
   param const char cString

 Arguments
   cString is a character string.

 Return
   The right-adjusted derivative of the input string.

 Description
   The radjust() function right-adjusts the input string. If the parameter
   passed to radjust() contains text followed by trailing spaces, the
   function returns a string of equal length, with the trailing spaces moved
   to the left.

 Example
   #define EXAMPLE_STRING
   #include example.hdr

   proc Test_radjust
   ? ">" + radjust( "         test" ) + "<"     // output: >         test<
   ? ">" + radjust( "    test     " ) + "<"     // output: >         test<
   ? ">" + radjust( "test         " ) + "<"     // output: >         test<
   ? ">" + radjust( "test"          ) + "<"     // output: >test<
   endproc

   proc main
   Test_radjust()
   endproc

See Also: center() ladjust()

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