<-- Previous || Up || Next -->

Coerce To Boolean Fast Function
Coerce Make Class

Public Function CoerceToBooleanFast( _
    ByVal vString As String _
    ) As Boolean

"Coerce String To Boolean (Fast)"
Return the Boolean value whose in-memory representation is the same as the first two characters in string vString.
Faster version of the CoerceToBoolean function which has restrictive argument types (to avoid argument fix-up overhead).

    CoerceToBooleanFast(Chr$(0) + Chr$(0)) = False
    CoerceToBooleanFast(Chr$(255) + Chr$(255)) = True
See also:
    CoerceToBoolean Function
    MakeBooleanFast Function
vString: The string whose first two characters are to be interpreted as a Boolean value.
Note: Function does NOT generate an error if vString less than or greater than two characters long.
Note: If vString is more than two characters long, the leftmost two characters are coerced to a Boolean value.

Note: This function first converts the string from Unicode to the default code page of the system.
v1.3 Change: Removed 16-bit support from this function.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.