You can use the LenB function to find out how many bytes the string takes up. More information at http://docs.realsoftware.com/index.php/LenB
Dim str As String = someLargeAmountOfText
Dim iLength As UInt64 = str.lenB
If iLength <= somevalue Then
Process(str)
End If