本文整理汇总了TypeScript中angular2/src/facade/lang.StringWrapper类的典型用法代码示例。如果您正苦于以下问题:TypeScript StringWrapper类的具体用法?TypeScript StringWrapper怎么用?TypeScript StringWrapper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了StringWrapper类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: expect
() => {
var input = "+angular2 is amazing";
expect(StringWrapper.stripLeft(input, "*")).toEqual(input);
});
开发者ID:2947721120,项目名称:angular,代码行数:4,代码来源:lang_spec.ts
示例2: _randomChar
function _randomChar(): string {
return StringWrapper.fromCharCode(97 + Math.floor(Math.random() * 25));
}
开发者ID:844496869,项目名称:angular,代码行数:3,代码来源:application_tokens.ts
示例3: advance
advance() {
this.peek = ++this.index >= this.length ? $EOF : StringWrapper.charCodeAt(this.input, this.index);
}
开发者ID:tavwizard,项目名称:angular,代码行数:3,代码来源:lexer.ts
示例4: expectCharacter
expectCharacter(code: int) {
if (this.optionalCharacter(code)) return;
this.error(`Missing expected ${StringWrapper.fromCharCode(code)}`);
}
开发者ID:188799958,项目名称:angular,代码行数:4,代码来源:parser.ts
示例5: compareIgnoreLang
function compareIgnoreLang(a: string, b: string): number {
return StringWrapper.compare(stripLang(a), stripLang(b));
}
开发者ID:ChinnasamyM,项目名称:angular,代码行数:3,代码来源:public_api_spec.ts
示例6: _insertPolyfillDirectivesInCssText
_insertPolyfillDirectivesInCssText(cssText) {
return StringWrapper.replaceAllMapped(cssText, _cssContentNextSelectorRe, function(m) {
return m[1] + '{';
});
}
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:5,代码来源:shadow_css.ts
示例7: _colonHostPartReplacer
_colonHostPartReplacer(host, part, suffix) {
return host + StringWrapper.replace(part, _polyfillHost, '') + suffix;
}
开发者ID:gdi2290,项目名称:sample-Angular2,代码行数:3,代码来源:shadow_css.ts
示例8: _normalizeAttributeName
_normalizeAttributeName(attrName: string): string {
return StringWrapper.startsWith(attrName, 'data-') ? StringWrapper.substring(attrName, 5) :
attrName;
}
开发者ID:goderbauer,项目名称:angular,代码行数:4,代码来源:property_binding_parser.ts
示例9: function
ListWrapper.forEach(entries, function(entry) {
var message = Json.parse(entry['message'])['message'];
if (StringWrapper.equals(message['method'], 'Timeline.eventRecorded')) {
ListWrapper.push(records, message['params']['record']);
}
});
开发者ID:B-Thapa,项目名称:angular,代码行数:6,代码来源:ios_driver_extension.ts
示例10: supports
supports(capabilities: {[key: string]: any}): boolean {
return StringWrapper.equals(capabilities['browserName'].toLowerCase(), 'safari');
}
开发者ID:1186792881,项目名称:angular,代码行数:3,代码来源:ios_driver_extension.ts
注:本文中的angular2/src/facade/lang.StringWrapper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论