Skip to content

Instantly share code, notes, and snippets.

@kritzikratzi
Created December 15, 2010 03:05
Show Gist options
  • Save kritzikratzi/741570 to your computer and use it in GitHub Desktop.
Save kritzikratzi/741570 to your computer and use it in GitHub Desktop.
void printMaxValue( int start, int end ){
int maxValue = 0;
println( "Considering " + lines.length + " lines: (chars " + start + " to " + end + ")" );
for( int i = 0; i < lines.length; i++ ){
if( lines[i].length() >= end ){
println( i + ": extracted " + lines[i].substring( start, end ) + ", which parses as " + int( lines[i].substring( start, end ) ) );
maxValue = max( maxValue, int( lines[i].substring( start, end ) ) );
}
else{
println( i + ": too short!" );
}
}
println( "--- that would be all!" );
println( maxValue );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment