(string)
| 626 | // Based on fragment from Dean Edwards' Base 2 library |
| 627 | // format("a %1 and a %2", "cat", "dog") -> "a cat and a dog" |
| 628 | function __formatString(string) { |
| 629 | var args = arguments; |
| 630 | var pattern = RegExp("%([1-" + (arguments.length - 1) + "])", "g"); |
| 631 | return string.replace(pattern, function (match, index) { |
| 632 | return args[index]; |
| 633 | }); |
| 634 | } |
| 635 | |
| 636 | // end of string functions |
| 637 |
no outgoing calls
no test coverage detected