Skip to content

Instantly share code, notes, and snippets.

@Varriount
Created October 19, 2013 01:20
Show Gist options
  • Save Varriount/7050608 to your computer and use it in GitHub Desktop.
Save Varriount/7050608 to your computer and use it in GitHub Desktop.
# Old, C-Sharp code
string longtext = text1.Length > text2.Length ? text1 : text2;
string shorttext = text1.Length > text2.Length ? text2 : text1;
#New, nimrod code.
var longText = textOne
var shortText = textTwo
if len(textOne) > len(textTwo):
swap(longText, shortText)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment