projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52cacab
)
Roo/util/Format.js
author
Alan Knowles
<alan@roojs.com>
Thu, 21 Jun 2018 02:23:07 +0000
(10:23 +0800)
committer
Alan Knowles
<alan@roojs.com>
Thu, 21 Jun 2018 02:23:07 +0000
(10:23 +0800)
Roo/util/Format.js
patch
|
blob
|
history
diff --git
a/Roo/util/Format.js
b/Roo/util/Format.js
index
5092b2f
..
8c90026
100644
(file)
--- a/
Roo/util/Format.js
+++ b/
Roo/util/Format.js
@@
-195,9
+195,7
@@
Roo.util.Format = function(){
// add comma's
if(thousandsDelimiter.length != 0) {
- while (r.test(whole)) {
- whole = whole.replace(r, '$1' + thousandsDelimiter + '$2');
- }
+ whole = whole.replace(/\B(?=(\d{3})+(?!\d))/g, thousandsDelimiter );
}
var sub = ps[1] ?