enyojs/enyo — pull request #696 by aarontam (2014-04-02 00:21:08+00:00)
Title: BHV-3181: Add method for determining RTL mode based on first character of string content.

Issue
-------
We have multiple types of controls which need to determine RTL mode. We also need to ignore LTR numbers and punctuation that comprise the first character from causing the content to be classified as LTR.

Fix
----
The previous method located in `Marquee` has been moved to `Control` to be available as a control-level method available to any control. Additionally, there is an additional conditional check to ensure we perform our RTL check for first characters that are non-numbers and non-punctuation.

Notes
--------
A ran a benchmark that compared using 2 char code comparisons vs. potentially 6 char code comparisons, and the resulting difference did not appear statistically significant on the TV. These are covered by the last 6 tests here: http://jsperf.com/charcode-comparisons

Enyo-DCO-1.1-Signed-off-by: Aaron Tam