Does this line start with " :" where " " is in multi_line_fields? Sets *colon_pos to the position of the colon.
| 100 | // Does this line start with "<spaces><field>:" where "<field>" is |
| 101 | // in multi_line_fields? Sets *colon_pos to the position of the colon. |
| 102 | static bool StartsWithFieldName(StringPiece line, |
| 103 | const std::vector<string>& multi_line_fields) { |
| 104 | StringPiece up_to_colon; |
| 105 | if (!SplitAt(':', &line, &up_to_colon)) return false; |
| 106 | while (absl::ConsumePrefix(&up_to_colon, " ")) |
| 107 | ; // Remove leading spaces. |
| 108 | for (const auto& field : multi_line_fields) { |
| 109 | if (up_to_colon == field) { |
| 110 | return true; |
| 111 | } |
| 112 | } |
| 113 | return false; |
| 114 | } |
| 115 | |
| 116 | static bool ConvertLine(StringPiece line, |
| 117 | const std::vector<string>& multi_line_fields, |
no test coverage detected