Check if letter is a lowercase letter without using a RegEx pattern "\\p{Ll}"


does anyone know a way to check whether a Unicode character is lower case or not without using a RegEX pattern like “\p{Ll}”?


since “lower case” letters exist at all kinds of code points I’m not sure there is a simpler way

Wondering why?

sed is your friend
regex not so much :stuck_out_tongue:

edit : ok slightly off topic unix joke but … whatever

@Markus Winter suggests the following:

If char = char.Lowercase Then ...

Good suggestion.

Won’t that always return true since Xojo is case insensitive?

You‘re right, that’s not working.

Try StrComp, but regex would still be more accurate, I think.

Looks like the following code works fine:

Var i As Integer = char.Compare(char.Lowercase, ComparisonOptions.CaseSensitive)

Not this forum URLs…

This seems to work too:

[code]Dim result() As String
result.Append “Capital letter”
result.Append “Lowercase letter”

messagebox If(asc(char.Lowercase) = asc(char), result(1), result(0))