PageRenderTime 57ms CodeModel.GetById 24ms RepoModel.GetById 1ms app.codeStats 0ms

/files//1.4.0/string.js

https://gitlab.com/Mirros/jsdelivr
JavaScript | 934 lines | 868 code | 54 blank | 12 comment | 57 complexity | 81541ac0cbd88a4dc6ba48c9a45f2200 MD5 | raw file
  1. /*
  2. string.js - Copyright (C) 2012-2013, JP Richardson <jprichardson@gmail.com>
  3. */
  4. !(function() {
  5. "use strict";
  6. var VERSION = '1.4.0';
  7. var ENTITIES = {};
  8. function S(s) {
  9. if (s !== null && s !== undefined) {
  10. if (typeof s === 'string')
  11. this.s = s;
  12. else
  13. this.s = s.toString();
  14. } else {
  15. this.s = s; //null or undefined
  16. }
  17. this.orig = s; //original object, currently only used by toCSV() and toBoolean()
  18. if (s !== null && s !== undefined) {
  19. if (this.__defineGetter__) {
  20. this.__defineGetter__('length', function() {
  21. return this.s.length;
  22. })
  23. } else {
  24. this.length = s.length;
  25. }
  26. } else {
  27. this.length = -1;
  28. }
  29. }
  30. var __nsp = String.prototype;
  31. var __sp = S.prototype = {
  32. between: function(left, right) {
  33. var s = this.s;
  34. var startPos = s.indexOf(left);
  35. var endPos = s.indexOf(right);
  36. var start = startPos + left.length;
  37. return new S(endPos > startPos ? s.slice(start, endPos) : "");
  38. },
  39. //# modified slightly from https://github.com/epeli/underscore.string
  40. camelize: function() {
  41. var s = this.trim().s.replace(/(\-|_|\s)+(.)?/g, function(mathc, sep, c) {
  42. return (c ? c.toUpperCase() : '');
  43. });
  44. return new S(s);
  45. },
  46. capitalize: function() {
  47. return new S(this.s.substr(0, 1).toUpperCase() + this.s.substring(1).toLowerCase());
  48. },
  49. charAt: function(index) {
  50. return this.s.charAt(index);
  51. },
  52. chompLeft: function(prefix) {
  53. var s = this.s;
  54. if (s.indexOf(prefix) === 0) {
  55. s = s.slice(prefix.length);
  56. return new S(s);
  57. } else {
  58. return this;
  59. }
  60. },
  61. chompRight: function(suffix) {
  62. if (this.endsWith(suffix)) {
  63. var s = this.s;
  64. s = s.slice(0, s.length - suffix.length);
  65. return new S(s);
  66. } else {
  67. return this;
  68. }
  69. },
  70. //#thanks Google
  71. collapseWhitespace: function() {
  72. var s = this.s.replace(/[\s\xa0]+/g, ' ').replace(/^\s+|\s+$/g, '');
  73. return new S(s);
  74. },
  75. contains: function(ss) {
  76. return this.s.indexOf(ss) >= 0;
  77. },
  78. count: function(ss) {
  79. var count = 0
  80. , pos = this.s.indexOf(ss)
  81. while (pos >= 0) {
  82. count += 1
  83. pos = this.s.indexOf(ss, pos + 1)
  84. }
  85. return count
  86. },
  87. //#modified from https://github.com/epeli/underscore.string
  88. dasherize: function() {
  89. var s = this.trim().s.replace(/[_\s]+/g, '-').replace(/([A-Z])/g, '-$1').replace(/-+/g, '-').toLowerCase();
  90. return new S(s);
  91. },
  92. decodeHtmlEntities: function() { //https://github.com/substack/node-ent/blob/master/index.js
  93. var s = this.s;
  94. s = s.replace(/&#(\d+);?/g, function (_, code) {
  95. return String.fromCharCode(code);
  96. })
  97. .replace(/&#[xX]([A-Fa-f0-9]+);?/g, function (_, hex) {
  98. return String.fromCharCode(parseInt(hex, 16));
  99. })
  100. .replace(/&([^;\W]+;?)/g, function (m, e) {
  101. var ee = e.replace(/;$/, '');
  102. var target = ENTITIES[e] || (e.match(/;$/) && ENTITIES[ee]);
  103. if (typeof target === 'number') {
  104. return String.fromCharCode(target);
  105. }
  106. else if (typeof target === 'string') {
  107. return target;
  108. }
  109. else {
  110. return m;
  111. }
  112. })
  113. return new S(s);
  114. },
  115. endsWith: function(suffix) {
  116. var l = this.s.length - suffix.length;
  117. return l >= 0 && this.s.indexOf(suffix, l) === l;
  118. },
  119. escapeHTML: function() { //from underscore.string
  120. return new S(this.s.replace(/[&<>"']/g, function(m){ return '&' + reversedEscapeChars[m] + ';'; }));
  121. },
  122. ensureLeft: function(prefix) {
  123. var s = this.s;
  124. if (s.indexOf(prefix) === 0) {
  125. return this;
  126. } else {
  127. return new S(prefix + s);
  128. }
  129. },
  130. ensureRight: function(suffix) {
  131. var s = this.s;
  132. if (this.endsWith(suffix)) {
  133. return this;
  134. } else {
  135. return new S(s + suffix);
  136. }
  137. },
  138. humanize: function() { //modified from underscore.string
  139. if (this.s === null || this.s === undefined)
  140. return new S('')
  141. var s = this.underscore().replace(/_id$/,'').replace(/_/g, ' ').trim().capitalize()
  142. return new S(s)
  143. },
  144. isAlpha: function() {
  145. return !/[^a-z\xC0-\xFF]/.test(this.s.toLowerCase());
  146. },
  147. isAlphaNumeric: function() {
  148. return !/[^0-9a-z\xC0-\xFF]/.test(this.s.toLowerCase());
  149. },
  150. isEmpty: function() {
  151. return this.s === null || this.s === undefined ? true : /^[\s\xa0]*$/.test(this.s);
  152. },
  153. isLower: function() {
  154. return this.isAlpha() && this.s.toLowerCase() === this.s;
  155. },
  156. isNumeric: function() {
  157. return !/[^0-9]/.test(this.s);
  158. },
  159. isUpper: function() {
  160. return this.isAlpha() && this.s.toUpperCase() === this.s;
  161. },
  162. left: function(N) {
  163. if (N >= 0) {
  164. var s = this.s.substr(0, N);
  165. return new S(s);
  166. } else {
  167. return this.right(-N);
  168. }
  169. },
  170. pad: function(len, ch) { //https://github.com/component/pad
  171. ch = ch || ' ';
  172. if (this.s.length >= len) return new S(this.s);
  173. len = len - this.s.length;
  174. var left = Array(Math.ceil(len / 2) + 1).join(ch);
  175. var right = Array(Math.floor(len / 2) + 1).join(ch);
  176. return new S(left + this.s + right);
  177. },
  178. padLeft: function(len, ch) { //https://github.com/component/pad
  179. ch = ch || ' ';
  180. if (this.s.length >= len) return new S(this.s);
  181. return new S(Array(len - this.s.length + 1).join(ch) + this.s);
  182. },
  183. padRight: function(len, ch) { //https://github.com/component/pad
  184. ch = ch || ' ';
  185. if (this.s.length >= len) return new S(this.s);
  186. return new S(this.s + Array(len - this.s.length + 1).join(ch));
  187. },
  188. parseCSV: function(delimiter, qualifier, escape, lineDelimiter) { //try to parse no matter what
  189. delimiter = delimiter || ',';
  190. escape = escape || '\\'
  191. if (typeof qualifier == 'undefined')
  192. qualifier = '"';
  193. var i = 0, fieldBuffer = [], fields = [], len = this.s.length, inField = false, self = this;
  194. var ca = function(i){return self.s.charAt(i)};
  195. if (typeof lineDelimiter !== 'undefined') var rows = [];
  196. if (!qualifier)
  197. inField = true;
  198. while (i < len) {
  199. var current = ca(i);
  200. switch (current) {
  201. case escape:
  202. //fix for issues #32 and #35
  203. if (inField && ((escape !== qualifier) || ca(i+1) === qualifier)) {
  204. i += 1;
  205. fieldBuffer.push(ca(i));
  206. break;
  207. }
  208. if (escape !== qualifier) break;
  209. case qualifier:
  210. inField = !inField;
  211. break;
  212. case delimiter:
  213. if (inField && qualifier)
  214. fieldBuffer.push(current);
  215. else {
  216. fields.push(fieldBuffer.join(''))
  217. fieldBuffer.length = 0;
  218. }
  219. break;
  220. case lineDelimiter:
  221. if (inField) {
  222. fieldBuffer.push(current);
  223. } else {
  224. if (rows) {
  225. fields.push(fieldBuffer.join(''))
  226. rows.push(fields);
  227. fields = [];
  228. fieldBuffer.length = 0;
  229. }
  230. }
  231. break;
  232. default:
  233. if (inField)
  234. fieldBuffer.push(current);
  235. break;
  236. }
  237. i += 1;
  238. }
  239. fields.push(fieldBuffer.join(''));
  240. if (rows) {
  241. rows.push(fields);
  242. return rows;
  243. }
  244. return fields;
  245. },
  246. replaceAll: function(ss, r) {
  247. //var s = this.s.replace(new RegExp(ss, 'g'), r);
  248. var s = this.s.split(ss).join(r)
  249. return new S(s);
  250. },
  251. right: function(N) {
  252. if (N >= 0) {
  253. var s = this.s.substr(this.s.length - N, N);
  254. return new S(s);
  255. } else {
  256. return this.left(-N);
  257. }
  258. },
  259. slugify: function() {
  260. var sl = (new S(this.s.replace(/[^\w\s-]/g, '').toLowerCase())).dasherize().s;
  261. if (sl.charAt(0) === '-')
  262. sl = sl.substr(1);
  263. return new S(sl);
  264. },
  265. startsWith: function(prefix) {
  266. return this.s.lastIndexOf(prefix, 0) === 0;
  267. },
  268. stripPunctuation: function() {
  269. //return new S(this.s.replace(/[\.,-\/#!$%\^&\*;:{}=\-_`~()]/g,""));
  270. return new S(this.s.replace(/[^\w\s]|_/g, "").replace(/\s+/g, " "));
  271. },
  272. stripTags: function() { //from sugar.js
  273. var s = this.s, args = arguments.length > 0 ? arguments : [''];
  274. multiArgs(args, function(tag) {
  275. s = s.replace(RegExp('<\/?' + tag + '[^<>]*>', 'gi'), '');
  276. });
  277. return new S(s);
  278. },
  279. template: function(values, opening, closing) {
  280. var s = this.s
  281. var opening = opening || Export.TMPL_OPEN
  282. var closing = closing || Export.TMPL_CLOSE
  283. var r = new RegExp(opening + '(.+?)' + closing, 'g')
  284. //, r = /\{\{(.+?)\}\}/g
  285. var matches = s.match(r) || [];
  286. matches.forEach(function(match) {
  287. var key = match.substring(opening.length, match.length - closing.length);//chop {{ and }}
  288. if (values[key])
  289. s = s.replace(match, values[key]);
  290. });
  291. return new S(s);
  292. },
  293. times: function(n) {
  294. return new S(new Array(n + 1).join(this.s));
  295. },
  296. toBoolean: function() {
  297. if (typeof this.orig === 'string') {
  298. var s = this.s.toLowerCase();
  299. return s === 'true' || s === 'yes' || s === 'on';
  300. } else
  301. return this.orig === true || this.orig === 1;
  302. },
  303. toFloat: function(precision) {
  304. var num = parseFloat(this.s)
  305. if (precision)
  306. return parseFloat(num.toFixed(precision))
  307. else
  308. return num
  309. },
  310. toInt: function() { //thanks Google
  311. // If the string starts with '0x' or '-0x', parse as hex.
  312. return /^\s*-?0x/i.test(this.s) ? parseInt(this.s, 16) : parseInt(this.s, 10)
  313. },
  314. trim: function() {
  315. var s;
  316. if (typeof __nsp.trim === 'undefined')
  317. s = this.s.replace(/(^\s*|\s*$)/g, '')
  318. else
  319. s = this.s.trim()
  320. return new S(s);
  321. },
  322. trimLeft: function() {
  323. var s;
  324. if (__nsp.trimLeft)
  325. s = this.s.trimLeft();
  326. else
  327. s = this.s.replace(/(^\s*)/g, '');
  328. return new S(s);
  329. },
  330. trimRight: function() {
  331. var s;
  332. if (__nsp.trimRight)
  333. s = this.s.trimRight();
  334. else
  335. s = this.s.replace(/\s+$/, '');
  336. return new S(s);
  337. },
  338. truncate: function(length, pruneStr) { //from underscore.string, author: github.com/rwz
  339. var str = this.s;
  340. length = ~~length;
  341. pruneStr = pruneStr || '...';
  342. if (str.length <= length) return new S(str);
  343. var tmpl = function(c){ return c.toUpperCase() !== c.toLowerCase() ? 'A' : ' '; },
  344. template = str.slice(0, length+1).replace(/.(?=\W*\w*$)/g, tmpl); // 'Hello, world' -> 'HellAA AAAAA'
  345. if (template.slice(template.length-2).match(/\w\w/))
  346. template = template.replace(/\s*\S+$/, '');
  347. else
  348. template = new S(template.slice(0, template.length-1)).trimRight().s;
  349. return (template+pruneStr).length > str.length ? new S(str) : new S(str.slice(0, template.length)+pruneStr);
  350. },
  351. toCSV: function() {
  352. var delim = ',', qualifier = '"', escape = '\\', encloseNumbers = true, keys = false;
  353. var dataArray = [];
  354. function hasVal(it) {
  355. return it !== null && it !== '';
  356. }
  357. if (typeof arguments[0] === 'object') {
  358. delim = arguments[0].delimiter || delim;
  359. delim = arguments[0].separator || delim;
  360. qualifier = arguments[0].qualifier || qualifier;
  361. encloseNumbers = !!arguments[0].encloseNumbers;
  362. escape = arguments[0].escape || escape;
  363. keys = !!arguments[0].keys;
  364. } else if (typeof arguments[0] === 'string') {
  365. delim = arguments[0];
  366. }
  367. if (typeof arguments[1] === 'string')
  368. qualifier = arguments[1];
  369. if (arguments[1] === null)
  370. qualifier = null;
  371. if (this.orig instanceof Array)
  372. dataArray = this.orig;
  373. else { //object
  374. for (var key in this.orig)
  375. if (this.orig.hasOwnProperty(key))
  376. if (keys)
  377. dataArray.push(key);
  378. else
  379. dataArray.push(this.orig[key]);
  380. }
  381. var rep = escape + qualifier;
  382. var buildString = [];
  383. for (var i = 0; i < dataArray.length; ++i) {
  384. var shouldQualify = hasVal(qualifier)
  385. if (typeof dataArray[i] == 'number')
  386. shouldQualify &= encloseNumbers;
  387. if (shouldQualify)
  388. buildString.push(qualifier);
  389. if (dataArray[i] !== null && dataArray[i] !== undefined) {
  390. var d = new S(dataArray[i]).replaceAll(qualifier, rep).s;
  391. buildString.push(d);
  392. } else
  393. buildString.push('')
  394. if (shouldQualify)
  395. buildString.push(qualifier);
  396. if (delim)
  397. buildString.push(delim);
  398. }
  399. //chop last delim
  400. //console.log(buildString.length)
  401. buildString.length = buildString.length - 1;
  402. return new S(buildString.join(''));
  403. },
  404. toString: function() {
  405. return this.s;
  406. },
  407. //#modified from https://github.com/epeli/underscore.string
  408. underscore: function() {
  409. var s = this.trim().s.replace(/([a-z\d])([A-Z]+)/g, '$1_$2').replace(/[-\s]+/g, '_').toLowerCase();
  410. if ((new S(this.s.charAt(0))).isUpper()) {
  411. s = '_' + s;
  412. }
  413. return new S(s);
  414. },
  415. unescapeHTML: function() { //from underscore.string
  416. return new S(this.s.replace(/\&([^;]+);/g, function(entity, entityCode){
  417. var match;
  418. if (entityCode in escapeChars) {
  419. return escapeChars[entityCode];
  420. } else if (match = entityCode.match(/^#x([\da-fA-F]+)$/)) {
  421. return String.fromCharCode(parseInt(match[1], 16));
  422. } else if (match = entityCode.match(/^#(\d+)$/)) {
  423. return String.fromCharCode(~~match[1]);
  424. } else {
  425. return entity;
  426. }
  427. }));
  428. },
  429. valueOf: function() {
  430. return this.s.valueOf();
  431. }
  432. }
  433. var methodsAdded = [];
  434. function extendPrototype() {
  435. for (var name in __sp) {
  436. (function(name){
  437. var func = __sp[name];
  438. if (!__nsp.hasOwnProperty(name)) {
  439. methodsAdded.push(name);
  440. __nsp[name] = function() {
  441. String.prototype.s = this;
  442. return func.apply(this, arguments);
  443. }
  444. }
  445. })(name);
  446. }
  447. }
  448. function restorePrototype() {
  449. for (var i = 0; i < methodsAdded.length; ++i)
  450. delete String.prototype[methodsAdded[i]];
  451. methodsAdded.length = 0;
  452. }
  453. /*************************************
  454. /* Attach Native JavaScript String Properties
  455. /*************************************/
  456. var nativeProperties = getNativeStringProperties();
  457. for (var name in nativeProperties) {
  458. (function(name) {
  459. var stringProp = __nsp[name];
  460. if (typeof stringProp == 'function') {
  461. //console.log(stringProp)
  462. if (!__sp[name]) {
  463. if (nativeProperties[name] === 'string') {
  464. __sp[name] = function() {
  465. //console.log(name)
  466. return new S(stringProp.apply(this, arguments));
  467. }
  468. } else {
  469. __sp[name] = stringProp;
  470. }
  471. }
  472. }
  473. })(name);
  474. }
  475. /*************************************
  476. /* Function Aliases
  477. /*************************************/
  478. __sp.repeat = __sp.times;
  479. __sp.include = __sp.contains;
  480. __sp.toInteger = __sp.toInt;
  481. __sp.toBool = __sp.toBoolean;
  482. __sp.decodeHTMLEntities = __sp.decodeHtmlEntities //ensure consistent casing scheme of 'HTML'
  483. /*************************************
  484. /* Private Functions
  485. /*************************************/
  486. function getNativeStringProperties() {
  487. var names = getNativeStringPropertyNames();
  488. var retObj = {};
  489. for (var i = 0; i < names.length; ++i) {
  490. var name = names[i];
  491. var func = __nsp[name];
  492. try {
  493. var type = typeof func.apply('teststring', []);
  494. retObj[name] = type;
  495. } catch (e) {}
  496. }
  497. return retObj;
  498. }
  499. function getNativeStringPropertyNames() {
  500. var results = [];
  501. if (Object.getOwnPropertyNames) {
  502. results = Object.getOwnPropertyNames(__nsp);
  503. results.splice(results.indexOf('valueOf'), 1);
  504. results.splice(results.indexOf('toString'), 1);
  505. return results;
  506. } else { //meant for legacy cruft, this could probably be made more efficient
  507. var stringNames = {};
  508. var objectNames = [];
  509. for (var name in String.prototype)
  510. stringNames[name] = name;
  511. for (var name in Object.prototype)
  512. delete stringNames[name];
  513. //stringNames['toString'] = 'toString'; //this was deleted with the rest of the object names
  514. for (var name in stringNames) {
  515. results.push(name);
  516. }
  517. return results;
  518. }
  519. }
  520. function Export(str) {
  521. return new S(str);
  522. };
  523. //attach exports to StringJSWrapper
  524. Export.extendPrototype = extendPrototype;
  525. Export.restorePrototype = restorePrototype;
  526. Export.VERSION = VERSION;
  527. Export.TMPL_OPEN = '{{';
  528. Export.TMPL_CLOSE = '}}';
  529. Export.ENTITIES = ENTITIES;
  530. /*************************************
  531. /* Exports
  532. /*************************************/
  533. if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
  534. module.exports = Export;
  535. } else {
  536. if(typeof define === "function" && define.amd) {
  537. define([], function() {
  538. return Export;
  539. });
  540. } else {
  541. window.S = Export;
  542. }
  543. }
  544. /*************************************
  545. /* 3rd Party Private Functions
  546. /*************************************/
  547. //from sugar.js
  548. function multiArgs(args, fn) {
  549. var result = [], i;
  550. for(i = 0; i < args.length; i++) {
  551. result.push(args[i]);
  552. if(fn) fn.call(args, args[i], i);
  553. }
  554. return result;
  555. }
  556. //from underscore.string
  557. var escapeChars = {
  558. lt: '<',
  559. gt: '>',
  560. quot: '"',
  561. apos: "'",
  562. amp: '&'
  563. };
  564. //from underscore.string
  565. var reversedEscapeChars = {};
  566. for(var key in escapeChars){ reversedEscapeChars[escapeChars[key]] = key; }
  567. ENTITIES = {
  568. "amp" : "&",
  569. "gt" : ">",
  570. "lt" : "<",
  571. "quot" : "\"",
  572. "apos" : "'",
  573. "AElig" : 198,
  574. "Aacute" : 193,
  575. "Acirc" : 194,
  576. "Agrave" : 192,
  577. "Aring" : 197,
  578. "Atilde" : 195,
  579. "Auml" : 196,
  580. "Ccedil" : 199,
  581. "ETH" : 208,
  582. "Eacute" : 201,
  583. "Ecirc" : 202,
  584. "Egrave" : 200,
  585. "Euml" : 203,
  586. "Iacute" : 205,
  587. "Icirc" : 206,
  588. "Igrave" : 204,
  589. "Iuml" : 207,
  590. "Ntilde" : 209,
  591. "Oacute" : 211,
  592. "Ocirc" : 212,
  593. "Ograve" : 210,
  594. "Oslash" : 216,
  595. "Otilde" : 213,
  596. "Ouml" : 214,
  597. "THORN" : 222,
  598. "Uacute" : 218,
  599. "Ucirc" : 219,
  600. "Ugrave" : 217,
  601. "Uuml" : 220,
  602. "Yacute" : 221,
  603. "aacute" : 225,
  604. "acirc" : 226,
  605. "aelig" : 230,
  606. "agrave" : 224,
  607. "aring" : 229,
  608. "atilde" : 227,
  609. "auml" : 228,
  610. "ccedil" : 231,
  611. "eacute" : 233,
  612. "ecirc" : 234,
  613. "egrave" : 232,
  614. "eth" : 240,
  615. "euml" : 235,
  616. "iacute" : 237,
  617. "icirc" : 238,
  618. "igrave" : 236,
  619. "iuml" : 239,
  620. "ntilde" : 241,
  621. "oacute" : 243,
  622. "ocirc" : 244,
  623. "ograve" : 242,
  624. "oslash" : 248,
  625. "otilde" : 245,
  626. "ouml" : 246,
  627. "szlig" : 223,
  628. "thorn" : 254,
  629. "uacute" : 250,
  630. "ucirc" : 251,
  631. "ugrave" : 249,
  632. "uuml" : 252,
  633. "yacute" : 253,
  634. "yuml" : 255,
  635. "copy" : 169,
  636. "reg" : 174,
  637. "nbsp" : 160,
  638. "iexcl" : 161,
  639. "cent" : 162,
  640. "pound" : 163,
  641. "curren" : 164,
  642. "yen" : 165,
  643. "brvbar" : 166,
  644. "sect" : 167,
  645. "uml" : 168,
  646. "ordf" : 170,
  647. "laquo" : 171,
  648. "not" : 172,
  649. "shy" : 173,
  650. "macr" : 175,
  651. "deg" : 176,
  652. "plusmn" : 177,
  653. "sup1" : 185,
  654. "sup2" : 178,
  655. "sup3" : 179,
  656. "acute" : 180,
  657. "micro" : 181,
  658. "para" : 182,
  659. "middot" : 183,
  660. "cedil" : 184,
  661. "ordm" : 186,
  662. "raquo" : 187,
  663. "frac14" : 188,
  664. "frac12" : 189,
  665. "frac34" : 190,
  666. "iquest" : 191,
  667. "times" : 215,
  668. "divide" : 247,
  669. "OElig;" : 338,
  670. "oelig;" : 339,
  671. "Scaron;" : 352,
  672. "scaron;" : 353,
  673. "Yuml;" : 376,
  674. "fnof;" : 402,
  675. "circ;" : 710,
  676. "tilde;" : 732,
  677. "Alpha;" : 913,
  678. "Beta;" : 914,
  679. "Gamma;" : 915,
  680. "Delta;" : 916,
  681. "Epsilon;" : 917,
  682. "Zeta;" : 918,
  683. "Eta;" : 919,
  684. "Theta;" : 920,
  685. "Iota;" : 921,
  686. "Kappa;" : 922,
  687. "Lambda;" : 923,
  688. "Mu;" : 924,
  689. "Nu;" : 925,
  690. "Xi;" : 926,
  691. "Omicron;" : 927,
  692. "Pi;" : 928,
  693. "Rho;" : 929,
  694. "Sigma;" : 931,
  695. "Tau;" : 932,
  696. "Upsilon;" : 933,
  697. "Phi;" : 934,
  698. "Chi;" : 935,
  699. "Psi;" : 936,
  700. "Omega;" : 937,
  701. "alpha;" : 945,
  702. "beta;" : 946,
  703. "gamma;" : 947,
  704. "delta;" : 948,
  705. "epsilon;" : 949,
  706. "zeta;" : 950,
  707. "eta;" : 951,
  708. "theta;" : 952,
  709. "iota;" : 953,
  710. "kappa;" : 954,
  711. "lambda;" : 955,
  712. "mu;" : 956,
  713. "nu;" : 957,
  714. "xi;" : 958,
  715. "omicron;" : 959,
  716. "pi;" : 960,
  717. "rho;" : 961,
  718. "sigmaf;" : 962,
  719. "sigma;" : 963,
  720. "tau;" : 964,
  721. "upsilon;" : 965,
  722. "phi;" : 966,
  723. "chi;" : 967,
  724. "psi;" : 968,
  725. "omega;" : 969,
  726. "thetasym;" : 977,
  727. "upsih;" : 978,
  728. "piv;" : 982,
  729. "ensp;" : 8194,
  730. "emsp;" : 8195,
  731. "thinsp;" : 8201,
  732. "zwnj;" : 8204,
  733. "zwj;" : 8205,
  734. "lrm;" : 8206,
  735. "rlm;" : 8207,
  736. "ndash;" : 8211,
  737. "mdash;" : 8212,
  738. "lsquo;" : 8216,
  739. "rsquo;" : 8217,
  740. "sbquo;" : 8218,
  741. "ldquo;" : 8220,
  742. "rdquo;" : 8221,
  743. "bdquo;" : 8222,
  744. "dagger;" : 8224,
  745. "Dagger;" : 8225,
  746. "bull;" : 8226,
  747. "hellip;" : 8230,
  748. "permil;" : 8240,
  749. "prime;" : 8242,
  750. "Prime;" : 8243,
  751. "lsaquo;" : 8249,
  752. "rsaquo;" : 8250,
  753. "oline;" : 8254,
  754. "frasl;" : 8260,
  755. "euro;" : 8364,
  756. "image;" : 8465,
  757. "weierp;" : 8472,
  758. "real;" : 8476,
  759. "trade;" : 8482,
  760. "alefsym;" : 8501,
  761. "larr;" : 8592,
  762. "uarr;" : 8593,
  763. "rarr;" : 8594,
  764. "darr;" : 8595,
  765. "harr;" : 8596,
  766. "crarr;" : 8629,
  767. "lArr;" : 8656,
  768. "uArr;" : 8657,
  769. "rArr;" : 8658,
  770. "dArr;" : 8659,
  771. "hArr;" : 8660,
  772. "forall;" : 8704,
  773. "part;" : 8706,
  774. "exist;" : 8707,
  775. "empty;" : 8709,
  776. "nabla;" : 8711,
  777. "isin;" : 8712,
  778. "notin;" : 8713,
  779. "ni;" : 8715,
  780. "prod;" : 8719,
  781. "sum;" : 8721,
  782. "minus;" : 8722,
  783. "lowast;" : 8727,
  784. "radic;" : 8730,
  785. "prop;" : 8733,
  786. "infin;" : 8734,
  787. "ang;" : 8736,
  788. "and;" : 8743,
  789. "or;" : 8744,
  790. "cap;" : 8745,
  791. "cup;" : 8746,
  792. "int;" : 8747,
  793. "there4;" : 8756,
  794. "sim;" : 8764,
  795. "cong;" : 8773,
  796. "asymp;" : 8776,
  797. "ne;" : 8800,
  798. "equiv;" : 8801,
  799. "le;" : 8804,
  800. "ge;" : 8805,
  801. "sub;" : 8834,
  802. "sup;" : 8835,
  803. "nsub;" : 8836,
  804. "sube;" : 8838,
  805. "supe;" : 8839,
  806. "oplus;" : 8853,
  807. "otimes;" : 8855,
  808. "perp;" : 8869,
  809. "sdot;" : 8901,
  810. "lceil;" : 8968,
  811. "rceil;" : 8969,
  812. "lfloor;" : 8970,
  813. "rfloor;" : 8971,
  814. "lang;" : 9001,
  815. "rang;" : 9002,
  816. "loz;" : 9674,
  817. "spades;" : 9824,
  818. "clubs;" : 9827,
  819. "hearts;" : 9829,
  820. "diams;" : 9830
  821. }
  822. }).call(this);