code: public static String writeReverse(String src, int options)
      {
          /* error checking */
          if (src == null) {
              throw new IllegalArgumentException();
          }
  
          if (src.length() > 0) {
              return BidiWriter.writeReverse(src, options);
          } else {
              /* nothing to do */
              return "";
          }
      }
docs: Reverse a Right-To-Left run of Unicode text.
  
  This method preserves the integrity of characters with multiple
  code units and (optionally) combining characters.
  Characters can be replaced by mirror-image characters
  in the destination buffer. Note that "real" mirroring has
  to be done in a rendering engine by glyph selection
  and that for many "mirrored" characters there are no
  Unicode characters as mirror-image equivalents.
  There are also options to insert or remove Bidi control
  characters.
  
  This method is the implementation for reversing RTL runs as part
  of <code>writeReordered()</code>. For detailed descriptions
  of the parameters, see there.
  Since no Bidi controls are inserted here, the output string length
  will never exceed <code>src.length()</code>.
  
  @see #writeReordered
  
  @param src The RTL run text.
  
  @param options A bit set of options for the reordering that control
  how the reordered text is written.
  See the <code>options</code> parameter in <code>writeReordered()</code>.
  
  @return The reordered text.
  If the <code>REMOVE_BIDI_CONTROLS</code> option
  is set, then the length of the returned string may be less than
  <code>src.length()</code>. If this option is not set,
  then the length of the returned string will be exactly
  <code>src.length()</code>.
  
  @throws IllegalArgumentException if <code>src</code> is null.