mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
Made sleep suffixes case-insensitive
This commit is contained in:
parent
c399046c1a
commit
410a964431
1 changed files with 4 additions and 4 deletions
|
@ -101,10 +101,10 @@ fn sleep(args: &[~str]) {
|
|||
|
||||
fn match_suffix(arg: &mut ~str) -> Result<int, ~str> {
|
||||
let result = match (*arg).pop_char() {
|
||||
's' => Ok(1),
|
||||
'm' => Ok(60),
|
||||
'h' => Ok(60 * 60),
|
||||
'd' => Ok(60 * 60 * 24),
|
||||
's' | 'S' => Ok(1),
|
||||
'm' | 'M' => Ok(60),
|
||||
'h' | 'H' => Ok(60 * 60),
|
||||
'd' | 'D' => Ok(60 * 60 * 24),
|
||||
val => {
|
||||
(*arg).push_char(val);
|
||||
if !val.is_alphabetic() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue