|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.i18n.shared.BidiUtils
public class BidiUtils
Utility functions for performing common Bidi tests on strings.
Method Summary | |
---|---|
boolean |
endsWithLtr(java.lang.String str)
Like endsWithLtr(String, boolean) , but assumes str is not
HTML / HTML-escaped. |
boolean |
endsWithLtr(java.lang.String str,
boolean isHtml)
Check whether the last strongly-directional character in the string is LTR. |
boolean |
endsWithRtl(java.lang.String str)
Like endsWithRtl(String, boolean) , but assumes str is not
HTML / HTML-escaped. |
boolean |
endsWithRtl(java.lang.String str,
boolean isHtml)
Check whether the last strongly-directional character in the string is RTL. |
HasDirection.Direction |
estimateDirection(java.lang.String str)
Like estimateDirection(String, boolean) , but assumes str
is not HTML / HTML-escaped. |
HasDirection.Direction |
estimateDirection(java.lang.String str,
boolean isHtml)
Estimates the directionality of a string based on relative word counts. |
static BidiUtils |
get()
Get an instance of BidiUtils. |
boolean |
hasAnyLtr(java.lang.String str)
Like hasAnyLtr(String, boolean) , but assumes str is not
HTML / HTML-escaped. |
boolean |
hasAnyLtr(java.lang.String str,
boolean isHtml)
Checks if the given string has any LTR characters in it. |
boolean |
hasAnyRtl(java.lang.String str)
Like hasAnyRtl(String, boolean) , but assumes str is not
HTML / HTML-escaped. |
boolean |
hasAnyRtl(java.lang.String str,
boolean isHtml)
Checks if the given string has any RTL characters in it. |
boolean |
startsWithLtr(java.lang.String str)
Like startsWithLtr(String, boolean) , but assumes str is
not HTML / HTML-escaped. |
boolean |
startsWithLtr(java.lang.String str,
boolean isHtml)
Check whether the first strongly-directional character in the string is LTR. |
boolean |
startsWithRtl(java.lang.String str)
Like startsWithRtl(String, boolean) , but assumes str is
not HTML / HTML-escaped. |
boolean |
startsWithRtl(java.lang.String str,
boolean isHtml)
Check whether the first strongly-directional character in the string is RTL. |
(package private) java.lang.String |
stripHtmlIfNeeded(java.lang.String str,
boolean isStripNeeded)
Returns the input text with spaces instead of HTML tags or HTML escapes, if isStripNeeded is true. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static BidiUtils get()
public boolean endsWithLtr(java.lang.String str)
endsWithLtr(String, boolean)
, but assumes str
is not
HTML / HTML-escaped.
public boolean endsWithLtr(java.lang.String str, boolean isHtml)
str
- the string to checkisHtml
- whether str is HTML / HTML-escaped
public boolean endsWithRtl(java.lang.String str)
endsWithRtl(String, boolean)
, but assumes str
is not
HTML / HTML-escaped.
public boolean endsWithRtl(java.lang.String str, boolean isHtml)
str
- the string to checkisHtml
- whether str is HTML / HTML-escaped
public HasDirection.Direction estimateDirection(java.lang.String str)
estimateDirection(String, boolean)
, but assumes str
is not HTML / HTML-escaped.
public HasDirection.Direction estimateDirection(java.lang.String str, boolean isHtml)
str
- the string to checkisHtml
- whether str
is HTML / HTML-escaped. Use this to
ignore HTML tags and escapes that would otherwise be mistaken for
LTR text.
public boolean hasAnyLtr(java.lang.String str)
hasAnyLtr(String, boolean)
, but assumes str
is not
HTML / HTML-escaped.
str
- the string to be tested
public boolean hasAnyLtr(java.lang.String str, boolean isHtml)
str
- the string to be testedisHtml
- whether str is HTML / HTML-escaped
public boolean hasAnyRtl(java.lang.String str)
hasAnyRtl(String, boolean)
, but assumes str
is not
HTML / HTML-escaped.
str
- the string to be tested
public boolean hasAnyRtl(java.lang.String str, boolean isHtml)
isHtml
- whether str is HTML / HTML-escapedstr
- the string to be tested
public boolean startsWithLtr(java.lang.String str)
startsWithLtr(String, boolean)
, but assumes str
is
not HTML / HTML-escaped.
public boolean startsWithLtr(java.lang.String str, boolean isHtml)
str
- the string to checkisHtml
- whether str is HTML / HTML-escaped
public boolean startsWithRtl(java.lang.String str)
startsWithRtl(String, boolean)
, but assumes str
is
not HTML / HTML-escaped.
public boolean startsWithRtl(java.lang.String str, boolean isHtml)
str
- the string to checkisHtml
- whether str
is HTML / HTML-escaped
java.lang.String stripHtmlIfNeeded(java.lang.String str, boolean isStripNeeded)
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |