How i make a conditional case-insensitive such that it works in all capitlization variations?

Options

So i have a conditional Where, String A == String B.

What is the simplest way to make sure it returns true if the strings match in all characters regarding if their capitalization match? So if i am comparing Myemail@gmail.com to myemail@gmail.com it will return true?

Answers

  • arturosanz
    arturosanz Member ✭✭
    edited October 2023
    Options

    @Jay the easiest way is by applying either the to_lower filter or the to_upper filter. For email types this is more than enough. I suggest you to add the trim filter at too, to avoid being in trouble when users input trailing spaces unconsciously, which is typical when typing on smartphone keyboards.

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options

    Stacking on @arturosanz 's correct response to manage case sensitivity: try to make sure to store the email as lowercase when you create/edit the user as well to make this work easier. That will allow your lookups to be very fast and easy to implement using his technique.