linuxwindowsinboxwhatsappicloudtweetdeckhipchattelegramhangoutsslackgmailskypefacebook-workplaceoutlookemailmicrosoft-teamsdiscordmessengercustom-servicesmacos
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
327 B
14 lines
327 B
/** |
|
* Created by vsxed on 7/11/2016. |
|
*/ |
|
Ext.define('Rambox.util.Format', { |
|
singleton: true |
|
|
|
,formatNumber: function(n) { |
|
return n.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,"); |
|
} |
|
|
|
,stripNumber: function(n) { |
|
return (typeof n == "number") ? n : n.match(/\d+/g) ? parseInt(n.match(/\d+/g).join("")) : 0; |
|
} |
|
});
|
|
|