Created
May 13, 2016 22:50
-
-
Save Arachnid/4aeb911791e36997336a4aaa73732047 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
contract Test{ | |
function test(string input) { | |
Slice remainder = input.slice(); | |
while(!remainder.empty()) { | |
Slice first = remainder.copy(); | |
remainder = remainder.find("."); | |
first = first.until(remainder); | |
// Do something with first | |
remainder = remainder.advanceBy("."); // or something | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment