Underscore.string:一个实用的String字符串操作JavaScript扩展

openkk 12年前

Javascript缺少完整的字符串操作,Underscore.string试图弥补这个缺陷。Underscore.string提供了便利的字符串操作,受Prototype.js, Right.js等框架启发。

Underscore.string提供了一些实用的功能包括:capitalize, clean, includes, count, escapeHTML, unescapeHTML, insert, splice, startsWith, endsWith, titleize, trim, truncate等。

Underscore.string:一个实用的String字符串操作JavaScript扩展

示例:http://epeli.github.com/underscore.string/