Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
2 | 2 | 2 | 0.976 | ExpressionStatement |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 2 | 221 | Closure/closure/goog/i18n/bidiformatter.js |
2 | 2 | 254 | Closure/closure/goog/i18n/bidiformatter.js |
| ||||
/** * Returns "rtl" if {@code str}'s estimated directionality is RTL, and "ltr" if * it is LTR. In case it's UNKNOWN, returns "rtl" if the context directionality * is RTL, and "ltr" otherwise. * Needed for GXP, which can't handle dirAttr. * Example use case: * <td expr:dir='bidiFormatter.dirAttrValue(foo)'><gxp:eval expr='foo'></td> * * @param {string} str Text whose directionality is to be estimated. * @param {boolean=} opt_isHtml Whether {@code str} is HTML / HTML-escaped. * Default: false. * @return {string} "rtl" or "ltr", according to the logic described above. */ goog.i18n.BidiFormatter.prototype.dirAttrValue= function (str, opt_isHtml){ return this.knownDirAttrValue(this.estimateDirection(str, opt_isHtml)); } ; |
| ||||
/** * Returns "dir=ltr" or "dir=rtl", depending on {@code str}'s estimated * directionality, if it is not the same as the context directionality. * Otherwise, returns the empty string. * * @param {string} str Text whose directionality is to be estimated. * @param {boolean=} opt_isHtml Whether {@code str} is HTML / HTML-escaped. * Default: false. * @return {string} "dir=rtl" for RTL text in non-RTL context; "dir=ltr" for LTR * text in non-LTR context; else, the empty string. */ goog.i18n.BidiFormatter.prototype.dirAttr= function (str, opt_isHtml){ return this.knownDirAttr(this.estimateDirection(str, opt_isHtml)); } ; |
| |||
/** * Returns "dir=ltr" or "dir=rtl", depending on {@code str}'s estimated * directionality, if it is not the same as the context directionality. * Otherwise, returns the empty string. * * @param {string} str Text whose directionality is to be estimated. * @param {boolean=} opt_isHtml Whether {@code str} is HTML / HTML-escaped. * Default: false. * @return {string} "dir=rtl" for RTL text in non-RTL context; "dir=ltr" for LTR * text in non-LTR context; else, the empty string. */ /** * Returns "rtl" if {@code str}'s estimated directionality is RTL, and "ltr" if * it is LTR. In case it's UNKNOWN, returns "rtl" if the context directionality * is RTL, and "ltr" otherwise. * Needed for GXP, which can't handle dirAttr. * Example use case: * <td expr:dir='bidiFormatter.dirAttrValue(foo)'><gxp:eval expr='foo'></td> * * @param {string} str Text whose directionality is to be estimated. * @param {boolean=} opt_isHtml Whether {@code str} is HTML / HTML-escaped. * Default: false. * @return {string} "rtl" or "ltr", according to the logic described above. */ goog.i18n.BidiFormatter.prototype. [[#variable634769a0]]= function (str,opt_isHtml) { return this. [[#variable634768a0]](this.estimateDirection(str,opt_isHtml)); } ; |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#634769a0]] | dirAttr |
1 | 2 | [[#634769a0]] | dirAttrValue |
2 | 1 | [[#634768a0]] | knownDirAttr |
2 | 2 | [[#634768a0]] | knownDirAttrValue |