Lines Matching refs:s
31 std::vector<std::string> SplitString(const std::string &s, char c) { in SplitString() argument
36 while ((matchPos = s.find(c, startPos)) != std::string::npos) { in SplitString()
37 components.push_back(s.substr(startPos, matchPos - startPos)); in SplitString()
41 if (startPos <= s.length()) { in SplitString()
42 components.push_back(s.substr(startPos)); in SplitString()
61 bool parse(const std::string &s, std::vector<T> *objs) { in parse() argument
62 std::vector<std::string> v = SplitString(s, ','); in parse()
76 bool parseEnum(const std::string &s, E *e, const Array &strings) { in parseEnum() argument
78 if (s == strings.at(i)) { in parseEnum()
87 bool parse(const std::string &s, ENUM *hf) { \
88 return parseEnum(s, hf, g##ENUM##Strings); \
122 bool parseKernelConfigIntHelper(const std::string &s, T *i) { in parseKernelConfigIntHelper() argument
125 unsigned long long int ulli = strtoull(s.c_str(), &end, 0 /* base */); in parseKernelConfigIntHelper()
128 if (errno == 0 && s.c_str() != end && *end == '\0') { in parseKernelConfigIntHelper()
135 bool parseKernelConfigInt(const std::string &s, int64_t *i) { in parseKernelConfigInt() argument
136 return parseKernelConfigIntHelper(s, i); in parseKernelConfigInt()
139 bool parseKernelConfigInt(const std::string &s, uint64_t *i) { in parseKernelConfigInt() argument
140 return parseKernelConfigIntHelper(s, i); in parseKernelConfigInt()
143 bool parseRange(const std::string &s, KernelConfigRangeValue *range) { in parseRange() argument
144 auto pos = s.find('-'); in parseRange()
148 return parseKernelConfigInt(s.substr(0, pos), &range->first) in parseRange()
149 && parseKernelConfigInt(s.substr(pos + 1), &range->second); in parseRange()
152 bool parse(const std::string &s, KernelConfigKey *key) { in parse() argument
153 *key = s; in parse()
157 bool parseKernelConfigValue(const std::string &s, KernelConfigTypedValue *kctv) { in parseKernelConfigValue() argument
160 kctv->mStringValue = s; in parseKernelConfigValue()
163 return parseKernelConfigInt(s, &kctv->mIntegerValue); in parseKernelConfigValue()
165 return parseRange(s, &kctv->mRangeValue); in parseKernelConfigValue()
167 return parse(s, &kctv->mTristateValue); in parseKernelConfigValue()
171 bool parseKernelConfigTypedValue(const std::string& s, KernelConfigTypedValue* kctv) { in parseKernelConfigTypedValue() argument
172 if (parseKernelConfigInt(s, &kctv->mIntegerValue)) { in parseKernelConfigTypedValue()
176 if (parse(s, &kctv->mTristateValue)) { in parseKernelConfigTypedValue()
182 kctv->mStringValue = s; in parseKernelConfigTypedValue()
186 bool parse(const std::string &s, Version *ver) { in parse() argument
187 std::vector<std::string> v = SplitString(s, '.'); in parse()
206 bool parse(const std::string &s, VersionRange *vr) { in parse() argument
207 std::vector<std::string> v = SplitString(s, '-'); in parse()
234 bool parse(const std::string &s, VndkVersionRange *vr) { in parse() argument
235 std::vector<std::string> v = SplitString(s, '-'); in parse()
264 bool parse(const std::string &s, KernelVersion *kernelVersion) { in parse() argument
265 std::vector<std::string> v = SplitString(s, '.'); in parse()
287 bool parse(const std::string &s, TransportArch *ta) { in parse() argument
291 if (s.find(gTransportStrings.at(i)) != std::string::npos) { in parse()
301 if (s.find(gArchStrings.at(i)) != std::string::npos) { in parse()
317 bool parse(const std::string &s, ManifestHal *hal) { in parse() argument
318 std::vector<std::string> v = SplitString(s, '/'); in parse()
342 bool parse(const std::string &s, MatrixHal *req) { in parse() argument
343 std::vector<std::string> v = SplitString(s, '/'); in parse()
373 bool parse(const std::string &s, KernelSepolicyVersion *ksv){ in parse() argument
374 return ParseUint(s, &ksv->value); in parse()