words ::= ( '-' ) first-word ::= [a-z] [0-9a-z] word ::= [0-9a-z]+
| 63 | // first-word ::= [a-z] [0-9a-z]* |
| 64 | // word ::= [0-9a-z]+ |
| 65 | bool isLowercaseKebabString(std::string_view Input) { |
| 66 | if (Input.empty() || !islower(Input[0])) |
| 67 | return false; |
| 68 | for (char C : Input) { |
| 69 | if (C != '-' && !islower(C) && !isdigit(C)) |
| 70 | return false; |
| 71 | } |
| 72 | return Input.back() != '-' && Input.find("--"sv) == Input.npos; |
| 73 | } |
| 74 | |
| 75 | bool isEOF(std::string_view Input) { return Input.empty(); } |
| 76 |
no test coverage detected