Home | History | Annotate | Download | only in chromevox

Lines Matching defs:trimLeft

90 goog.string.trimLeft=function(a){return a.replace(/^[\s\xa0]+/,"")};goog.string.trimRight=function(a){return a.replace(/[\s\xa0]+$/,"")};goog.string.caseInsensitiveCompare=function(a,b){var c=String(a).toLowerCase(),d=String(b).toLowerCase();return c<d?-1:c==d?0:1};goog.string.numerateCompareRegExp_=/(\.\d+)|(\d+)|(\D+)/g;
851 cvox.Spannable.prototype.substring=function(a,b){var c=goog.isDef(b)?b:this.string_.length;if(0>a||c>this.string_.length||a>c)throw new RangeError("substring indices out of range");for(var d=new cvox.Spannable(this.string_.substring(a,c)),e=0;e<this.spans_.length;e++){var f=this.spans_[e];if(f.start<=c&&f.end>=a){var g=Math.max(0,f.start-a),h=Math.min(c-a,f.end-a);d.spans_.push({value:f.value,start:g,end:h})}}return d};cvox.Spannable.prototype.trimLeft=function(){return this.trim_(!0,!1)};
1189 cvox.SpeechRule.Component.fromString=function(a){var b={};b.type=cvox.SpeechRule.Type.fromString(a.substring(0,3));a=a.slice(3).trimLeft();if(!a)throw new cvox.SpeechRule.OutputError("Missing content.");switch(b.type){case cvox.SpeechRule.Type.TEXT:if('"'==a[0]){var c=cvox.SpeechRule.splitString_(a,"\\(")[0].trim();if('"'!=c.slice(-1))throw new cvox.SpeechRule.OutputError("Invalid string syntax.");b.content=c;a=a.slice(c.length).trim();-1==a.indexOf("(")&&(a="");break}case cvox.SpeechRule.Type.NODE:case cvox.SpeechRule.Type.MULTI:c=
1190 a.indexOf(" (");if(-1==c){b.content=a.trim();a="";break}b.content=a.substring(0,c).trim();a=a.slice(c).trimLeft()}b=new cvox.SpeechRule.Component(b);a&&b.addAttributes(a);return b};cvox.SpeechRule.Component.prototype.toString=function(){var a="",a=a+cvox.SpeechRule.Type.toString(this.type),a=a+(this.content?" "+this.content:""),b=this.getAttributes();0<b.length&&(a+=" ("+b.join(", ")+")");return a};