Skip to content

Commit ffdd67f

Browse files
committed
add test case
1 parent 5381353 commit ffdd67f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

functions/strings/sprintf.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ function sprintf() {
1818
// returns 3: '[####monkey]'
1919
// example 4: sprintf("%d", 123456789012345);
2020
// returns 4: '123456789012345'
21+
// example 4: sprintf( '%-03s', 'E' );
22+
// returns 5: 'E00'
2123

2224
var regex = /%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuideEfFgG])/g;
2325
var a = arguments;

0 commit comments

Comments
 (0)