Finds using StringPiece::find(), therefore the length of the found delimiter is delimiter.length().
| 61 | // Finds using StringPiece::find(), therefore the length of the found delimiter |
| 62 | // is delimiter.length(). |
| 63 | struct LiteralPolicy { |
| 64 | int Find(StringPiece text, StringPiece delimiter) { |
| 65 | return text.find(delimiter); |
| 66 | } |
| 67 | int Length(StringPiece delimiter) { |
| 68 | return delimiter.length(); |
| 69 | } |
| 70 | }; |
| 71 | |
| 72 | // Finds using StringPiece::find_first_of(), therefore the length of the found |
| 73 | // delimiter is 1. |