code: public static int[] getLineStartAndEndPositions( String text, int initialCaretPosition )
    {
      return new int[]{getLineStart( text, initialCaretPosition ), getLineEnd( text, initialCaretPosition )};
    }
docs: This will return a two element array, start line pos and end line pos.
  <p/>
  The character from the document for the startPos will be the first character of the line
  <p/>
  The character from the document for the endPos will be the last character of the line, i.e. the char before the new
  line if one is present.
  
  @return a two element array with the start and end positions of the given line