MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / SkipToNextSpecialByte

Function SkipToNextSpecialByte

tensorflow/core/lib/strings/ordered_code.cc:144–153  ·  view source on GitHub ↗

Return a pointer to the first byte in the range "[start..limit)" whose value is 0 or 255 (kEscape1 or kEscape2). If no such byte exists in the range, returns "limit".

Source from the content-addressed store, hash-verified

142// whose value is 0 or 255 (kEscape1 or kEscape2). If no such byte
143// exists in the range, returns "limit".
144inline const char* SkipToNextSpecialByte(const char* start, const char* limit) {
145 // If these constants were ever changed, this routine needs to change
146 DCHECK_EQ(kEscape1, 0);
147 DCHECK_EQ(kEscape2 & 0xffu, 255u);
148 const char* p = start;
149 while (p < limit && !IsSpecialByte(*p)) {
150 p++;
151 }
152 return p;
153}
154
155// Expose SkipToNextSpecialByte for testing purposes
156const char* OrderedCode::TEST_SkipToNextSpecialByte(const char* start,

Callers 3

EncodeStringFragmentFunction · 0.85
ReadStringInternalFunction · 0.85

Calls 1

IsSpecialByteFunction · 0.85

Tested by

no test coverage detected