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 - right() extract substring from the right end of a string http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 right()             Extract substring from the right end of a string
------------------------------------------------------------------------------
 Declaration
   string.hdr

 Syntax
   func char right extern
   param const char cString, ;
         value uint uChars

 Arguments
   cString is a character string.

   uChars is the length of the output string.

 Return
   The rightmost characters of the input string that produce the given
   length.

 Description
   The right() function returns uChars characters from cString, starting at
   the far right character.

 Example
   #define EXAMPLE_STRING
   #include example.hdr

   proc Test_right
   ? right( "Force compiler      ", 14 ) // prints "compiler      "
   ? len( right( "54321", 1 ) )          // prints 1
   ? len( right( "this", 0 ) )           // prints 0
   ? right( "A string", 255 )            // prints "A string"
   endproc

   proc main
   Test_right()
   endproc

See Also: left() substr()

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