Skip to content

Instantly share code, notes, and snippets.

@bduggan
Created April 25, 2016 18:59
Show Gist options
  • Save bduggan/8c01221a1081676e70eaeaa5b31e19e4 to your computer and use it in GitHub Desktop.
Save bduggan/8c01221a1081676e70eaeaa5b31e19e4 to your computer and use it in GitHub Desktop.
# casecmp should return 0 when strings are the same but different cases
bduggan: ruby -e "puts 'Reichwaldstraße'.casecmp('REICHWALDSTRASSE')"
1
bduggan: ruby -e "puts 'Ὀδυσσεύς'.casecmp('ὈΔΥΣΣΕΎΣ')"
1
bduggan: perl6 -e 'say fc("Reichwaldstraße") eq fc("REICHWALDSTRASSE")'
True
bduggan: perl6 -e "say fc('Ὀδυσσεύς') eq fc('ὈΔΥΣΣΕΎΣ')"
True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment