Home
last modified time | relevance | path

Searched refs:substr (Results 1 – 25 of 126) sorted by relevance

123456

/system/bpf/libbpf_android/
DLoaderUtils.h30 return ret.substr(0, lastindex);
49 token = s.substr(0, pos); in getMachineKvers()
52 if ((pos = token.find('-')) != std::string::npos) token = token.substr(0, pos); in getMachineKvers()
58 token = s.substr(0, pos); in getMachineKvers()
/system/tools/hidl/c2hal/
Dmain.cpp52 auto package = val.substr(0, index); in addPackageRootToMap()
53 auto path = val.substr(index + 1); in addPackageRootToMap()
69 return prefix == base.substr(0, prefix.size()); in isPathPrefix()
80 auto packagePath = package.substr(0, index); in applyPackageRootPath()
81 auto packageVersion = package.substr(index + 1); in applyPackageRootPath()
89 packagePath = packagePath.substr(rootPackage.size() + 1); in applyPackageRootPath()
/system/netd/server/
DControllersTest.cpp213 #define DELETE_SUBSTRING(substr, str) { \ in TEST_F() argument
214 size_t start = (str).find((substr)); \ in TEST_F()
216 (str).erase(start, strlen((substr))); \ in TEST_F()
217 ASSERT_EQ(std::string::npos, (str).find((substr))); \ in TEST_F()
/system/tools/hidl/host_utils/
DStringHelper.cpp91 copy = copy.substr(maxmatch.length()); in Tokenize()
162 in.substr(in.size() - suffix.size()) == suffix; in EndsWith()
167 in.substr(0, prefix.size()) == prefix; in StartsWith()
172 return in.substr(0, in.size() - suffix.size()); in RTrim()
180 return in.substr(prefix.size()); in LTrim()
193 copy = copy.substr(0, copy.size() - suffix.size()); in RTrimAll()
206 copy = copy.substr(prefix.size()); in LTrimAll()
219 components->push_back(s.substr(startPos, matchPos - startPos)); in SplitString()
224 components->push_back(s.substr(startPos)); in SplitString()
/system/extras/multinetwork/
Dhttpurl.cpp54 parameters->host = std::string(args.arg1).substr(strlen(HTTP_PREFIX)); in parseUrl()
57 parameters->path = parameters->host.substr(first_slash); in parseUrl()
72 parameters->hostname = parameters->host.substr(1, closing_bracket - 1); in parseUrl()
80 parameters->port = parameters->host.substr(closing_bracket + 2); in parseUrl()
85 parameters->port = parameters->host.substr(first_colon + 1); in parseUrl()
86 parameters->hostname = parameters->host.substr(0, first_colon); in parseUrl()
/system/update_engine/payload_generator/
Dmapfile_filesystem.cc99 line.substr(delim + 1, last_delim - (delim + 1)).as_string(); in GetFiles()
105 base::StringToUint64(blocks.substr(0, dash), &block_start) && in GetFiles()
106 base::StringToUint64(blocks.substr(dash + 1), &block_end)) { in GetFiles()
136 mapped_file.name = line.substr(0, last_delim).as_string(); in GetFiles()
/system/core/base/
Dstrings.cpp41 result.push_back(s.substr(base, found - base)); in Split()
80 return s.substr(start_index, end_index - start_index + 1); in Trim()
91 return s.substr(0, prefix.size()) == prefix; in StartsWith()
103 return s.size() >= suffix.size() && s.substr(s.size() - suffix.size(), suffix.size()) == suffix; in EndsWith()
Dparsenetaddress.cpp42 *host = address.substr(1, (address.find("]:") - 1)); in ParseNetAddress()
43 port_str = address.substr(address.rfind("]:") + 2); in ParseNetAddress()
/system/core/fs_mgr/
Dfs_mgr_boot_config.cpp44 auto source = cmdline.substr(base, found - base); in fs_mgr_parse_boot_config()
54 result.emplace_back(piece.substr(0, equal_sign), piece.substr(equal_sign + 1)); in fs_mgr_parse_boot_config()
/system/nfc/utils/
Dconfig.cc85 value_string_ = in.substr(1, in.length() - 2); in parseFromString()
92 return parseBytesString(in.substr(1, in.length() - 2), value_bytes_); in parseFromString()
130 string key(Trim(line.substr(0, search))); in parseFromString()
131 string value_string(Trim(line.substr(search + 1, string::npos))); in parseFromString()
/system/testing/gtest_extras/
DTest.cpp159 std::string second_line(output_.substr(line_end, 9)); in SetResultFromOutput()
160 if (output_.substr(line_end, 9) != "\nSkipped\n") { in SetResultFromOutput()
169 output_ = output_.substr(line_end + 9); in SetResultFromOutput()
/system/extras/preopt2cachename/
Dpreopt2cachename.cpp58 std::string apk_name = file_location.substr(file_location_start + 1, in ExtractAPKName()
78 cache_file += file_location.substr(initial_position, apk_position); in SystemBFilenameToCacheFile()
98 std::string extension(file_location.substr(pos)); in SystemBFilenameToCacheFile()
/system/extras/simpleperf/
Dread_apk.cpp139 return std::make_tuple(true, path.substr(0, pos), path.substr(pos + 2)); in SplitUrlInApk()
160 *entry_name = path.substr(entry_name_start, entry_name_end - entry_name_start); in ParseExtractedInMemoryPath()
161 *zip_path = path.substr(zip_path_start, zip_path_end - zip_path_start); in ParseExtractedInMemoryPath()
Dtracing.cpp294 name = s.substr(start, i - start); in ParseTracingField()
297 value = s.substr(start, i - start); in ParseTracingField()
305 field.name = value.substr(0, left_bracket_pos); in ParseTracingField()
312 if (android::base::ParseUint(value.substr(left_bracket_pos + 1, len), &elem_count)) { in ParseTracingField()
345 format.name = android::base::Trim(s.substr(pos + strlen("name:"))); in LoadTracingFormatsFromEventFiles()
352 strtoull(s.substr(pos + strlen("ID:")).c_str(), nullptr, 10); in LoadTracingFormatsFromEventFiles()
417 trace_type.system = type->name.substr(0, pos); in GetTracingData()
418 trace_type.name = type->name.substr(pos + 1); in GetTracingData()
/system/libvintf/
DKernelConfigParser.cpp79 std::string key = mRemaining.substr(0, equalPos); in processRemaining()
80 std::string value = mRemaining.substr(equalPos + 1); in processRemaining()
84 mError << "Duplicated key in configs: " << mRemaining.substr(0, equalPos) << "\n"; in processRemaining()
/system/tools/aidl/
Doptions_unittest.cpp156 EXPECT_EQ(string{kCompileCommandIncludePath}.substr(2), *options->ImportDirs().begin()); in TEST()
157 EXPECT_EQ(string{kCompileDepFile}.substr(2), options->DependencyFile()); in TEST()
167 EXPECT_EQ(string{kCompileCommandIncludePath}.substr(2), *options->ImportDirs().begin()); in TEST()
168 EXPECT_EQ(string{kCompileDepFile}.substr(2), options->DependencyFile()); in TEST()
Dcode_writer.cpp56 lines.push_back(formatted.substr(pos, (line_end - pos) + 1)); in Write()
59 lines.push_back(formatted.substr(pos)); in Write()
/system/core/adb/client/
Dline_printer.cpp41 result = result.substr(0, elide_size) in ElideMiddle()
43 + result.substr(result.size() - elide_size, elide_size); in ElideMiddle()
/system/tools/hidl/utils/
DFqInstance.cpp92 if (!mFqName.setTo(s.substr(0, pos))) return false; in setTo()
93 mInstance = pos == std::string::npos ? std::string{} : s.substr(pos + 1); in setTo()
/system/core/bootstat/
Dbootstat.cpp399 std::string next(r.substr(pos)); in isBluntRebootReason()
509 if (needle == reason.substr(pos, needle.length())) continue; in correctForBitError()
512 reason = reason.substr(0, pos) + needle + reason.substr(pos + needle.length()); in correctForBitError()
637 std::string subReason(content.substr(pos, max_reason_length)); in getSubreason()
648 correctForBitErrorOrUnderline(subReason, m.first.substr(strlen("reboot,")) + terminator); in getSubreason()
651 m.first.substr(strlen("kernel_panic,sysrq,")) + terminator); in getSubreason()
653 … correctForBitErrorOrUnderline(subReason, m.first.substr(strlen("kernel_panic,")) + terminator); in getSubreason()
754 system_boot_reason.substr(0, PROPERTY_VALUE_MAX - 1)); in BootReasonAddToHistory()
860 ret = s.first.substr(firstHasNot); in BootReasonStrToReason()
949 reason = reason.substr(strlen("reboot")); in BootReasonStrToReason()
[all …]
/system/core/storaged/
Dstoraged_info.cpp308 string str = buffer.substr(EXT_CSD_REV_IDX, 2); in report_debugfs()
317 str = buffer.substr(EXT_PRE_EOL_INFO_IDX, 2); in report_debugfs()
322 str = buffer.substr(EXT_DEVICE_LIFE_TIME_EST_A_IDX, 2); in report_debugfs()
327 str = buffer.substr(EXT_DEVICE_LIFE_TIME_EST_B_IDX, 2); in report_debugfs()
/system/security/keystore/
Dgrant_store.cpp35 std::stringstream s(grantAlias.substr(pos + kKeystoreGrantInfixLength)); in parseGrantAlias()
36 std::string wrapped_alias = grantAlias.substr(0, pos); in parseGrantAlias()
/system/core/init/
Daction_parser.cpp61 std::string prop_name(trigger.substr(prop_str.length())); in ParsePropertyTrigger()
67 std::string prop_value(prop_name.substr(equal_pos + 1)); in ParsePropertyTrigger()
Dmodalias_handler.cpp42 deps.emplace_back(args[0].substr(0, pos)); in ParseDepCallback()
56 auto mod_name = args[0].substr(start + 1, (end - start) - 1); in ParseDepCallback()
/system/core/libprocessgroup/
Dcgroup_map.cpp122 *group = content.substr(start_pos, std::string::npos); in GetTaskGroup()
124 *group = content.substr(start_pos, end_pos - start_pos); in GetTaskGroup()

123456