$FUNCNAME$
  RIGHT()
$CATEGORY$
  STRING
$SUMMARY$
   Return a substring beginning with the rightmost character
$LANG_RU$
    ,     .
$SYNTAX$
     RIGHT(<cString>, <nCount>) --> cSubString
$LANG_RU$
     RIGHT(< >, <- >) -> 
$ARGUMENTS$
     <cString> is the character string from which to extract characters.
     <nCount> is the number of characters to extract.
$LANG_RU$
     < > -  ,   
     .
     <- > -  ,   .
$RETURNS$
     RIGHT() returns the rightmost <nCount> characters of <cString>.  If
     <nCount> is zero, RIGHT() returns a null string ("").  If <nCount> is
     negative or larger than the length of the character string, RIGHT()
     returns <cString>.  The maximum string size is 65,535 (64K) bytes.
$LANG_RU$
     RIGHT()   ,   ,
        <- >.    
     ,    < >.  
      <- >   ,  RIGHT()
         ("").   
     <- >    ,  RIGHT() 
      ,    < >.
        - 65535 (64) .
$DESCRIPTION$
     RIGHT() is a character function that extracts a substring beginning with
     the rightmost character in <cString>.  It is the same as the character
     expression, SUBSTR(<cString>, <nCount>).  For example, RIGHT("ABC", 1)
     is the same as SUBSTR("ABC", -1).  RIGHT() is related to LEFT(), which
     extracts a substring beginning with the leftmost character in <cString>.

     The RIGHT(), LEFT(), and SUBSTR() functions are often used with both the
     AT() and RAT() functions to locate either the first and/or the last
     position of a substring before extracting it.
$LANG_RU$
     RIGHT() -    ,  
     ,       <
     >.     

     SUBSTR(< >,-<- >).

     , RIGHT("ABC", 1) -    ,   SUBSTR("ABC", -1).
      RIGHT()    LEFT(),  
     ,       <
     >.

      RIGHT(), LEFT()  SUBSTR()     
      AT()  RAT(),   /  
        .
$EXAMPLES$

       This example shows the relationship between RIGHT() and
	SUBSTR():

	? RIGHT("ABCDEF", 3)              // Result: DEF
	? SUBSTR("ABCDEF", -3)            // Result: DEF

       This example extracts a substring from the end of another
	string up to the last occurrence of a comma:

	LOCAL cName := "James,William"
	? RIGHT(cName,;
	LEN(cName) - RAT(",", cName) - 1)      // Result: William


$LANG_RU$

             RIGHT() 
       SUBSTR():

       ? RIGHT("ABCDEF", 3)               // : DEF
       ? SUBSTR("ABCDEF", -3)             // : DEF

              
       :

       LOCAL cName := ","
       ? RIGHT(cName,;
       LEN(cName) - RAT(",", cName) -1)   // : 


$SEEALSO$
  RTRIM(),STUFF(),SUBSTR(),LEFT(),LTRIM()
$END$
