Does anybody know the easiset way to convert two p...
# announcements
g
Does anybody know the easiset way to convert two possibly-backwards integer values into a range? I've got a variable
caretPosition
and
anchorPosition
that will identify some int range, but if the user selected left-to-right then the anchor is the low value and caret the high value, if they select right-to-left its vice-versa. Is there a nice one-liner built into std:lib that will get me a nice (forward & non-empty)
IntRange
?