Args is a convenience function that loads the next arguments (tokens on the same line) into an arbitrary number of strings pointed to in targets. If there are not enough argument tokens available to fill targets, false is returned and the remaining targets are left unchanged. If all the targets are
(targets ...*string)
| 270 | // targets are left unchanged. If all the targets are filled, |
| 271 | // then true is returned. |
| 272 | func (d *Dispenser) Args(targets ...*string) bool { |
| 273 | for i := range targets { |
| 274 | if !d.NextArg() { |
| 275 | return false |
| 276 | } |
| 277 | *targets[i] = d.Val() |
| 278 | } |
| 279 | return true |
| 280 | } |
| 281 | |
| 282 | // AllArgs is like Args, but if there are more argument tokens |
| 283 | // available than there are targets, false is returned. The |