Quick check whether a string looks like a curl command.
(text: &str)
| 13 | } |
| 14 | |
| 15 | /// Quick check whether a string looks like a curl command. |
| 16 | pub fn looks_like_curl(text: &str) -> bool { |
| 17 | let trimmed = text.trim_start(); |
| 18 | trimmed.starts_with("curl ") || trimmed.starts_with("curl\t") || trimmed.starts_with("curl\n") |
| 19 | } |
| 20 | |
| 21 | /// Parse a `curl` command string into a [`ParsedCurl`]. |
no outgoing calls
no test coverage detected