From dbde2687a24266145bca9a49acca56aca29a74f2 Mon Sep 17 00:00:00 2001 From: nixo Date: Sun, 25 Oct 2020 10:43:30 +0100 Subject: [PATCH] types: better Status parsing --- src/types.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/types.jl b/src/types.jl index abea109..3974b87 100644 --- a/src/types.jl +++ b/src/types.jl @@ -15,7 +15,8 @@ struct Status end Status(code::String, meta::String) = Status(code[1], code[2], meta) -Status(code::String) = Status(code[1], code[2], "") +Status(code::String) = + Status(code[1], code[2], length(code) > 2 ? String(strip(code[3:end])) : "") Status(code::Int, meta::String) = Status(string(code), meta) Status(code::Int) = Status(string(code))