Extracts the actual name part of an enum instance In other words, it returns the Blue part of Bikeshed::Colour::Blue
| 10581 | // Extracts the actual name part of an enum instance |
| 10582 | // In other words, it returns the Blue part of Bikeshed::Colour::Blue |
| 10583 | StringRef extractInstanceName(StringRef enumInstance) { |
| 10584 | // Find last occurrence of ":" |
| 10585 | size_t name_start = enumInstance.size(); |
| 10586 | while (name_start > 0 && enumInstance[name_start - 1] != ':') { |
| 10587 | --name_start; |
| 10588 | } |
| 10589 | return enumInstance.substr(name_start, enumInstance.size() - name_start); |
| 10590 | } |
| 10591 | } |
| 10592 | |
| 10593 | std::vector<StringRef> parseEnums( StringRef enums ) { |
no test coverage detected