Created
July 29, 2015 20:42
-
-
Save seebs/52f33db5cd223c8cb5f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int elements = root.getElementCount(); | |
int excess = elements - maximumLines; | |
if (excess > 0) { | |
if (isRemoveFromStart) { | |
root.replace(0, excess, new Element[0]); | |
} else { | |
root.replace(elements - excess, excess, new Element[0]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment