getDirection(str: string): BidiDirection {
    this._lastDir = UnicodeBidi.getDirection(str, this._lastDir);
    return this._lastDir;
  }
Returns the direction of a block of text, and remembers it as the
fall-back direction for the next paragraph.

@param str  A text block, e.g. paragraph, table cell, tag
@return     The resolved direction