| | 1435 | |
| | 1436 | =item fmt |
| | 1437 | |
| | 1438 | our Str multi method fmt( Scalar $scalar: ) |
| | 1439 | our Str multi method fmt( List $list:, Str $separator ) |
| | 1440 | our Str multi method fmt( Hash $hash:, Str $separator ) |
| | 1441 | our Str multi method fmt( Pair $pair: ) |
| | 1442 | |
| | 1443 | A wrapper on C<sprintf>. A call to the scalar version C<$o.fmt($format)> |
| | 1444 | returns the result of C<sprintf($format, $o)>. A call to the array version |
| | 1445 | C<@a.fmt($format, $sep)> returns the result of C<join $sep, map { |
| | 1446 | sprintf($format, $_) }, @a>. A call to the hash version C<%h.fmt($format, |
| | 1447 | $sep)> returns the result of C<join $sep, map { sprintf($format, $_.key, |
| | 1448 | $_.value) }, %h.pairs>. A call to the pair versionC<%p.fmt($format)> returns |
| | 1449 | the result of C<sprintf($format, %h.key, |
| | 1450 | %h.value)>. |