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

 Syntax
   func char ladjust extern
   param const char cString

 Arguments
   cString is a character string.

 Return
   The left-adjusted derivative of the input string.

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

 Example
   #define EXAMPLE_STRING
   #include example.hdr

   proc Test_ladjust
   ? ">" + ladjust( "         test" ) + "<"     // output: >test         <
   ? ">" + ladjust( "    test     " ) + "<"     // output: >test         <
   ? ">" + ladjust( "test         " ) + "<"     // output: >test         <
   ? ">" + ladjust( "test"          ) + "<"     // output: >test<
   endproc

   proc main
   Test_ladjust()
   endproc

See Also: center() radjust()

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