public static <T>T eachLine(CharSequence self,@ClosureParams(value=FromString.class,options={"String","String,Integer"}) Closure<T> closure) throws IOException {
  return eachLine((CharSequence)self.toString(),0,closure);
}

public static < T > T eachLine ( CharSequence self , @ ClosureParams ( value = FromString . class , options = { "String" , "String,Integer" } ) Closure < T > closure ) throws IOException { return eachLine ( ( CharSequence ) self . toString ( ) , 0 , closure ) ; }
iterates through this charsequence line by line . each line is passed to the given 1 or 2 arg closure . if a 2 arg closure is found the line count is passed as the second argument .
