Skip to content

comparing two Identifiers #2

Description

@flavluc

Hello, I was using the lib and I came to a situation where I wanted to compare two strings and check if they are equal modulo casing. So I tried:

fromAny "hello_world" == fromAny "hello-world"  -- True

But if I do:

fromAny "hello_world" == fromAny "helloWorld"  -- False

It would be great if I'd have a True as a result in the last example as well. Checking the output of fromAny I have:

fromAny "hello_world"  -- Identifier {unIdentifier = ["hello","world"]}
fromAny "helloWorld"  -- Identifier {unIdentifier = ["hello","World"]}

So I suppose it's just a matter of changing the first letter to lowercase. I'm not really sure if this is the expected behavior or if it'll break anything. But in case this is a valid suggestion, please let me know, I don't mind making a PR =)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions