Hello,
does anyone know a way to check whether a Unicode character is lower case or not without using a RegEX pattern like “\p{Ll}”?
Thanks
Hello,
does anyone know a way to check whether a Unicode character is lower case or not without using a RegEX pattern like “\p{Ll}”?
Thanks
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
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?
Youre right, thats 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))
[/code]