code: public int getParagraphIndex(int charIndex)
      {
          verifyValidParaOrLine();
          Bidi bidi = paraBidi;             /* get Para object if Line object */
          verifyRange(charIndex, 0, bidi.length);
          int paraIndex;
          for (paraIndex = 0; charIndex >= bidi.paras_limit[paraIndex]; paraIndex++) {
          }
          return paraIndex;
      }
docs: Get the index of a paragraph, given a position within the text.<p>
  
  @param charIndex is the index of a character within the text, in the
  range <code>[0..getProcessedLength()-1]</code>.
  
  @return The index of the paragraph containing the specified position,
  starting from 0.
  
  @throws IllegalStateException if this call is not preceded by a successful
  call to <code>setPara</code> or <code>setLine</code>
  @throws IllegalArgumentException if charIndex is not within the legal range
  
  @see android.icu.text.BidiRun
  @see #getProcessedLength