'''
'''  FF_RSET
'''  返回一个包含右对齐 （填充） 字符串的字符串。
'''
'''  If sPadCharacter is null (empty) or is not specified, then the function 
'''  pads string_expression with space characters to the left. Otherwise, 
'''  the function pads the string with the first character of sPadCharacter.
'''
'  Function FF_RSet( ByRef sMainString   as String, _
'                    ByRef nStringLength as Integer, _
'                    ByRef sPadCharacter as String = " " _
'                    ) as String


''
''  FF_RSET
''  Return a string containing a right-justified (padded) string.
''
''  If sPadCharacter is null (empty) or is not specified, then the function 
''  pads string_expression with space characters to the left. Otherwise, 
''  the function pads the string with the first character of sPadCharacter.
''
Function FF_RSet( ByRef sMainString   As String, _
                  ByRef nStringLength As Integer, _
                  ByRef sPadCharacter As String = " " _
                  ) As String

    Dim s As String 
    s = String( nStringLength, Asc(sPadCharacter, 1) )
    
    Mid( s, nStringLength-Len(sMainString)+1, Len(sMainString) ) = sMainString
    
    Function = s
End Function
