| Crates.io | shtring |
| lib.rs | shtring |
| version | 0.1.0 |
| created_at | 2020-11-06 14:46:10.2838+00 |
| updated_at | 2020-11-06 14:46:10.2838+00 |
| description | Split an input string into arguments by whitespace such that text between matching quotes is combined into a single argument. |
| homepage | |
| repository | https://github.com/Spanfile/shtring |
| max_upload_size | |
| id | 309235 |
| size | 18,688 |
Split an input string into arguments by whitespace such that text between matching quotes is combined into a single argument. Additionally, single character escapes are supported and ignored where applicable.
let input = "Hello world! \"This text will be a single argument.\" 'So \"will\" this.' \\\'Escaped quotes are ignored.\\\'";
let output = shtring::split(input)?;
assert_eq!(output, vec![
"Hello",
"world!",
"This text will be a single argument.",
"So \"will\" this.",
"\\\'Escaped",
"quotes",
"are",
"ignored.\\\'",
]);