'  FF_CLIPRIGHT
'  返回一个与nCount字符从字符串的右边删除字符串。
'  If nCount is less than one then the entire string is returned. 
'  Function FF_ClipRight( ByRef sMainString as String, _
'                         ByRef nCount      as Integer _
'                         ) as String

''
''  FF_CLIPRIGHT
''  Returns a string with nCount characters removed from the right side of the string.
''
''  If nCount is less than one then the entire string is returned. 
''
Function FF_ClipRight( ByRef sMainString as String, _
                       ByRef nCount      as Integer _
                       ) as String

    Dim nLen as Integer = Len(sMainString)
    If nCount <= 0 Then Return sMainString
    
    nCount = nLen - nCount
    nCount = IIf(nLen < nCount, nLen, nCount)
    Function = Left(sMainString, nCount)
    
End Function
