Skip to main content

parse_loop_args

Function parse_loop_args 

Source
pub fn parse_loop_args(args: &str) -> (Duration, String)
Expand description

Parse the argument string from /loop <args>.

Supports three forms:

  • Leading interval: /loop 5m check the build → (5m, “check the build”)
  • Trailing clause: /loop check the build every 2h → (2h, “check the build”)
  • No interval: /loop check the build → (10m default, “check the build”)

Returns (interval, prompt).