Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
wfpl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f252f5
)
format_int() removes leading zeros
author
Jason Woofenden
<jason183@herkamire.com>
Fri, 29 Dec 2006 08:47:38 +0000
(
03:47
-0500)
committer
Jason Woofenden
<jason183@herkamire.com>
Fri, 29 Dec 2006 08:47:38 +0000
(
03:47
-0500)
format.php
patch
|
blob
|
history
diff --git
a/format.php
b/format.php
index
d5fb32b
..
fc04b1b
100644
(file)
--- a/
format.php
+++ b/
format.php
@@
-23,7
+23,8
@@
# This file contains basic encodings
function format_int($str) {
- return ereg_replace('[^0-9]', '', $str);
+ $str = ereg_replace('[^0-9]', '', $str);
+ return ereg_replace('^0*([1-9])', '\1', $str);
}
function format_oneline($str) {