bool parseKerningUnicodeString(const String& input, UnicodeRanges& rangeList, HashSet<String>& stringList) { // FIXME: Parsing error detection is missing. const UChar* ptr = input.characters(); const UChar* end = ptr + input.length(); while (ptr < end) { const UChar* inputStart = ptr; while (ptr < end && *ptr != ',') ++ptr; if (ptr == inputStart) break; // Try to parse unicode range first UnicodeRange range; if (parseUnicodeRange(inputStart, ptr - inputStart, range)) rangeList.append(range); else stringList.add(String(inputStart, ptr - inputStart)); ++ptr; } return true; }
static bool genericParseKerningUnicodeString(const CharType*& ptr, const CharType* end, UnicodeRanges& rangeList, HashSet<String>& stringList) { while (ptr < end) { const CharType* inputStart = ptr; while (ptr < end && *ptr != ',') ++ptr; if (ptr == inputStart) break; // Try to parse unicode range first UnicodeRange range; if (parseUnicodeRange(inputStart, ptr - inputStart, range)) rangeList.append(range); else stringList.add(String(inputStart, ptr - inputStart)); ++ptr; } return true; }