01-21-2026, 11:07 PM
(This post was last modified: 01-21-2026, 11:09 PM by ahenry3068.)
You should be able to suss out an IsUpper and IsLower by dissecting IsAlpha
or
You do know you can force to Upper or Lower with UCASE$ & LCASE$ .
If I need to do case insensitive or case sensitive comparisons I use these.
or
Code: (Select All)
FUNCTION IsUpperLetter(L as String)
IsUpperLetter = ( ASC(L) >= ASC("A") and ASC(L) <= ASC("Z"))
END FUNCTION
FUNCTION IsLowerLetter(L as String)
IsLowerLetter = ( ASC(L) >= ASC("a") and ASC(L) <= ASC("z") )
END FUNCTION
FUNCTION IsLetter (L as String)
IsLetter = IsLowerLetter(L) or IsUpperLetter(L)
END FUNCTION
FUNCTION IsWhiteSpace(L as String)
DIM C AS INTEGER
C = ASC(L)
IsWhiteSpace = C=32 or C=9 or C=8 or C=13 or C=10 or C=7
END FUNCTION
FUNCTION IsAlpha(S as String)
DIM TMP AS INTEGER
DIM I AS LONG
TMP = _True
FOR I = 1 to Len(S)
If IsLetter(MID$(S,I,1)) or IsWhiteSpace(MID$(S,I,1)) THEN
_Continue
Else
TMP = _False
Exit For
End If
Next
IsAlpha = TMP
End FUNCTION
FUNCTION IsUpper(S as String)
DIM TMP AS INTEGER
DIM I AS LONG
TMP = _True
FOR I = 1 to Len(S)
If IsUpperLetter(MID$(S,I,1)) or IsWhiteSpace(MID$(S,I,1)) THEN
_Continue
Else
TMP = _False
Exit For
End If
Next
IsAlpha = TMP
End FUNCTION
FUNCTION IsLower(S as String)
DIM TMP AS INTEGER
DIM I AS LONG
TMP = _True
FOR I = 1 to Len(S)
If IsLowerLetter(MID$(S,I,1)) or IsWhiteSpace(MID$(S,I,1)) THEN
_Continue
Else
TMP = _False
Exit For
End If
Next
IsAlpha = TMP
End FUNCTION
You do know you can force to Upper or Lower with UCASE$ & LCASE$ .
If I need to do case insensitive or case sensitive comparisons I use these.

