code: public String shape(String text) throws ArabicShapingException {
          char[] src = text.toCharArray();
          char[] dest = src;
          if (((options & LAMALEF_MASK) == LAMALEF_RESIZE) &&
              ((options & LETTERS_MASK) == LETTERS_UNSHAPE)) {
  
              dest = new char[src.length * 2]; // max
          }
          int len = shape(src, 0, src.length, dest, 0, dest.length);
  
          return new String(dest, 0, len);
      }
docs: Convert a string, returning the new string.
  
  @param text the string to convert
  @return the converted string
  @throws ArabicShapingException if the string cannot be converted according to the options.