Lines Matching defs:segment
52 // Appends a FieldMask path segment to a prefix.
53 string AppendPathSegmentToPrefix(StringPiece prefix, StringPiece segment) {
55 return segment.ToString();
57 if (segment.empty()) {
60 // If the segment is a map key, appends it to the prefix without the ".".
61 if (segment.starts_with("[\"")) {
62 return StrCat(prefix, segment);
64 return StrCat(prefix, ".", segment);
79 // segment easier.
121 // segment easier.
149 // Checks whether the key ends at the end of a path segment.
155 "'. Map keys should be at the end of a path segment."));
180 // Gets the current segment - sub-string between previous position (after
182 StringPiece segment =
188 prefix.push(AppendPathSegmentToPrefix(current_prefix, segment));
189 } else if (!segment.empty()) {
192 // concatenating the last prefix with the current segment.
194 path_sink, AppendPathSegmentToPrefix(current_prefix, segment)));