Lines Matching defs:Units
101 // Returns the byte offset into the string that is an offset of \p Units in
105 static size_t measureUnits(llvm::StringRef U8, int Units, OffsetEncoding Enc,
107 Valid = Units >= 0;
108 if (Units <= 0)
113 Result = Units;
118 Units -= U16Len;
119 return Units <= 0;
121 if (Units < 0) // Offset in the middle of a surrogate pair.
127 Units--;
128 return Units <= 0;