Home
last modified time | relevance | path

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

12345678910>>...21

/aosp12/hardware/interfaces/gnss/common/utils/default/
H A DNmeaFixInfo.cpp100 tm.tm_mday = std::stoi(dateStr.substr(0, 2).c_str()); in nmeaPartsToTimestamp()
101 tm.tm_mon = std::stoi(dateStr.substr(2, 2).c_str()) - 1; in nmeaPartsToTimestamp()
102 tm.tm_year = std::stoi(dateStr.substr(4, 2).c_str()) + unixYearOffset; in nmeaPartsToTimestamp()
103 tm.tm_hour = std::stoi(timeStr.substr(0, 2).c_str()); in nmeaPartsToTimestamp()
104 tm.tm_min = std::stoi(timeStr.substr(2, 2).c_str()); in nmeaPartsToTimestamp()
105 tm.tm_sec = std::stoi(timeStr.substr(4, 2).c_str()); in nmeaPartsToTimestamp()
118 this->latDeg = std::stof(sentenceValues[2].substr(0, 2)) + in parseGGALine()
119 (std::stof(sentenceValues[2].substr(2)) / 60.0); in parseGGALine()
125 this->lngDeg = std::stof(sentenceValues[4].substr(0, 3)) + in parseGGALine()
126 std::stof(sentenceValues[4].substr(3)) / 60.0; in parseGGALine()
/aosp12/frameworks/base/tools/aapt2/compile/
H A DPseudolocaleGenerator.cpp153 const StringPiece16 substr = text.substr(cursor, span->first_char - cursor); in PseudolocalizeStyledString() local
154 cursor += substr.size(); in PseudolocalizeStyledString()
157 std::string new_substr = util::Utf16ToUtf8(substr); in PseudolocalizeStyledString()
180 const StringPiece16 substr = text.substr(cursor, parent_span->last_char - cursor + 1); in PseudolocalizeStyledString() local
181 cursor += substr.size(); in PseudolocalizeStyledString()
184 std::string new_substr = util::Utf16ToUtf8(substr); in PseudolocalizeStyledString()
202 new_string += localizer.Text(util::Utf16ToUtf8(text.substr(cursor, text.size() - cursor))); in PseudolocalizeStyledString()
257 result += localizer_.Text(original_string.substr(start, len)); in Visit()
261 result += original_string.substr(section.start, section.end - section.start); in Visit()
268 result += localizer_.Text(original_string.substr(start, len)); in Visit()
/aosp12/system/bt/gd/facade/
H A Dfacade_main.cc117 auto port_number = arg.substr(arg_grpc_root_server_port.size()); in main()
121 auto port_number = arg.substr(arg_grpc_server_port.size()); in main()
125 auto port_number = arg.substr(arg_rootcanal_port.size()); in main()
129 auto btsnoop_path = arg.substr(arg_btsnoop_path.size()); in main()
135 auto btsnooz_path = arg.substr(arg_btsnooz_path.size()); in main()
139 auto btconfig_path = arg.substr(arg_btconfig_path.size()); in main()
143 auto port_number = arg.substr(arg_signal_port.size()); in main()
/aosp12/art/compiler/
H A Dcfi_test.h85 static size_t FindEndOf(const std::string& str, const char* substr) { in FindEndOf() argument
86 size_t pos = str.find(substr); in FindEndOf()
88 return pos + strlen(substr); in FindEndOf()
96 line = line.substr(0, FindEndOf(line, ": ")) + in ReformatAsm()
97 line.substr(FindEndOf(line, "\t")); in ReformatAsm()
118 address = "0x" + line.substr(line.size() - 8); in ReformatCfi()
132 new_line = ".cfi_" + new_line.substr(FindEndOf(new_line, "DW_CFA_")); in ReformatCfi()
/aosp12/frameworks/minikin/tests/unittest/
H A DStringPieceTest.cpp86 TEST(StringPieceTest, substr) { in TEST() argument
88 EXPECT_EQ("", s.substr(0, 0)); in TEST()
89 EXPECT_EQ("a", s.substr(0, 1)); in TEST()
90 EXPECT_EQ("abc", s.substr(0, 3)); in TEST()
91 EXPECT_EQ("cde", s.substr(2, 3)); in TEST()
92 EXPECT_EQ("", s.substr(2, 0)); in TEST()
93 EXPECT_EQ("", s.substr(5, 0)); in TEST()
/aosp12/system/tools/hidl/c2hal/
H A 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()
/aosp12/system/tools/hidl/host_utils/
H A DStringHelper.cpp126 copy = copy.substr(maxmatch.length()); in Tokenize()
199 in.substr(in.size() - suffix.size()) == suffix; in EndsWith()
204 in.substr(0, prefix.size()) == prefix; in StartsWith()
209 return in.substr(0, in.size() - suffix.size()); in RTrim()
217 return in.substr(prefix.size()); in LTrim()
230 copy = copy.substr(0, copy.size() - suffix.size()); in RTrimAll()
243 copy = copy.substr(prefix.size()); in LTrimAll()
256 components->push_back(s.substr(startPos, matchPos - startPos)); in SplitString()
261 components->push_back(s.substr(startPos)); in SplitString()
/aosp12/system/core/fs_mgr/libsnapshot/
H A Dsnapshot_reader_test.cpp119 ASSERT_EQ(blob.substr(0, 100), base_blocks_[0].substr(kOffset, 100)); in TestByteReads()
120 ASSERT_EQ(blob.substr(kBlockSize - kOffset, kBlockSize), base_blocks_[4]); in TestByteReads()
121 ASSERT_EQ(blob.substr(kBlockSize * 2 - kOffset, 100), MakeNewBlockString().substr(0, 100)); in TestByteReads()
122 ASSERT_EQ(blob.substr(blob.size() - kOffset), base_blocks_[6].substr(0, kOffset)); in TestByteReads()
/aosp12/system/tools/aidl/
H A Dcomments.cpp51 return s.substr(prefix.size()); in ConsumePrefix()
56 return s.substr(0, s.size() - suffix.size()); in ConsumeSuffix()
85 const std::string& sanitized_line = line.substr(idx); in TrimmedLines()
97 lines.push_back(sanitized_line.substr(0, i)); in TrimmedLines()
143 tag = line.substr(idx, end_idx - idx); in BlockTags()
148 paragraph.push_back(line.substr(end_idx)); in BlockTags()
152 paragraph.push_back(line.substr(idx)); in BlockTags()
/aosp12/system/tools/hidl/lint/lints/
H A DmethodVersions.cpp37 return (underscore == std::string::npos) ? method.name() : method.name().substr(0, underscore); in getSanitizedMethodName()
44 std::string version = method.name().substr(underscore + 1); // don't include _ in checkMethodVersion()
45 std::string nameWithoutVersion = method.name().substr(0, underscore); in checkMethodVersion()
66 if (!base::ParseUint(version.substr(0, underscore), &major)) { in checkMethodVersion()
73 if (!base::ParseUint(version.substr(underscore + 1), &minor)) { in checkMethodVersion()
/aosp12/packages/modules/DnsResolver/
H A DDnsQueryLog.cpp28 return hostname.substr(0, 1) + "***"; in maskHostname()
37 ret += ip.substr(0, pos + 1) + "***, "; in maskIps()
40 ret += ip.substr(0, pos + 1) + "***, "; in maskIps()
45 return ret.empty() ? "" : ret.substr(0, ret.length() - 2); in maskIps()
/aosp12/system/netd/server/
H A 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()
/aosp12/bionic/tools/versioner/src/
H A DSymbolFileParser.cpp94 curr_line = android::base::Trim(line.substr(0, hash_pos)); in hasNextLine()
97 curr_tags = parseTags(line.substr(hash_pos + 1)); in hasNextLine()
125 std::string name = android::base::Trim(curr_line.substr(0, lparen_pos)); in parseVersion()
147 curr_line.substr(rparen_pos + 1, semicolon_pos - 1)); in parseVersion()
165 android::base::Trim(curr_line.substr(0, colon_pos)); in parseVersion()
186 android::base::Trim(curr_line.substr(0, semicolon_pos)); in parseVersion()
277 std::string api_level = tag.substr(tag.find('=') + 1); in parseApiLevelValue()
/aosp12/packages/modules/adb/client/
H A Dmdns_utils_test.cpp83 EXPECT_EQ(res->transport_type, transport.substr(1)); in TEST()
91 EXPECT_EQ(res->transport_type, transport.substr(1)); in TEST()
99 EXPECT_EQ(res->transport_type, transport.substr(1)); in TEST()
107 EXPECT_EQ(res->transport_type, transport.substr(1)); in TEST()
147 EXPECT_EQ(res->transport_type, transport.substr(1)); in TEST()
156 EXPECT_EQ(res->transport_type, transport.substr(1)); in TEST()
H A Dmdns_utils.cpp54 transport = t.substr(1); in mdns_parse_instance_name()
74 return std::make_optional<MdnsInstance>(name.substr(0, pos), name.substr(pos + 1), transport); in mdns_parse_instance_name()
/aosp12/system/core/fs_mgr/
H A Dfs_mgr_boot_config.cpp44 auto source = cmdline.substr(base, found - base); in fs_mgr_parse_cmdline()
54 result.emplace_back(piece.substr(0, equal_sign), piece.substr(equal_sign + 1)); in fs_mgr_parse_cmdline()
77 result.emplace_back(android::base::Trim(line.substr(0, equal_sign)), in fs_mgr_parse_proc_bootconfig()
78 android::base::Trim(line.substr(equal_sign + 1))); in fs_mgr_parse_proc_bootconfig()
/aosp12/art/dexoptanalyzer/
H A Ddexoptanalyzer.cc175 option.substr(strlen("--profile-analysis-result="))), nullptr, 0); in ParseArgs()
183 dex_file_ = std::string(option.substr(strlen("--dex-file="))); in ParseArgs()
196 image_ = std::string(option.substr(strlen("--image="))); in ParseArgs()
211 oat_fd_ = std::stoi(std::string(option.substr(strlen("--oat-fd="))), nullptr, 0); in ParseArgs()
216 vdex_fd_ = std::stoi(std::string(option.substr(strlen("--vdex-fd="))), nullptr, 0); in ParseArgs()
221 zip_fd_ = std::stoi(std::string(option.substr(strlen("--zip-fd="))), nullptr, 0); in ParseArgs()
226 context_str_ = std::string(option.substr(strlen("--class-loader-context="))); in ParseArgs()
229 std::string(option.substr(strlen("--class-loader-context-fds="))); in ParseArgs()
311 ? dex_file_.substr(0, dir_index) in GetDexOptNeeded()
/aosp12/hardware/qcom/sm7250/display/sdm/libs/utils/
H A Ddebug.cpp181 *height = UINT32(stoi(str.substr(str.find('x') + 1))); in GetMixerResolution()
196 str = (str.substr(str.find(',') + 1)); in GetWindowRect()
198 str = (str.substr(str.find(',') + 1)); in GetWindowRect()
200 str = (str.substr(str.find(',') + 1)); in GetWindowRect()
221 *num_dma_pipes = UINT32(stoi(str.substr(str.find('x') + 1))); in GetReducedConfig()
/aosp12/frameworks/av/media/libmediaformatshaper/
H A DCodecProperties.cpp115 std::string resolution = key.substr(strlen("vq-target-qpmax-")); in setTuningValue()
128 std::string resolution = key.substr(strlen("vq-target-bpp-")); in setTuningValue()
203 std::string w = resolution.substr(0, sep); in bppPoint()
204 std::string h = resolution.substr(sep+1); in bppPoint()
317 std::string w = resolution.substr(0, sep); in qpMaxPoint()
318 std::string h = resolution.substr(sep+1); in qpMaxPoint()
473 std::string actualKind = key.substr(0,pos); in getMappings()
481 pp[1] = strdup( key.substr(pos+1).c_str()); in getMappings()
484 pp[0] = strdup( key.substr(pos+1).c_str()); in getMappings()
/aosp12/system/extras/multinetwork/
H A Dhttpurl.cpp62 parameters->host = std::string(args.arg1).substr(strlen(HTTP_PREFIX)); in parseUrl()
65 parameters->path = parameters->host.substr(first_slash); in parseUrl()
80 parameters->hostname = parameters->host.substr(1, closing_bracket - 1); in parseUrl()
88 parameters->port = parameters->host.substr(closing_bracket + 2); in parseUrl()
93 parameters->port = parameters->host.substr(first_colon + 1); in parseUrl()
94 parameters->hostname = parameters->host.substr(0, first_colon); in parseUrl()
/aosp12/system/update_engine/payload_generator/
H A 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()
/aosp12/system/extras/simpleperf/
H A Dreport_utils.cpp67 std::string_view original_classname = s.substr(0, arrow_pos); in AddProguardMappingFile()
68 std::string obfuscated_classname(s.substr(arrow_end_pos, colon_pos - arrow_end_pos)); in AddProguardMappingFile()
77 auto original_methodname = s.substr(space_pos + 1, left_brace_pos - space_pos - 1); in AddProguardMappingFile()
81 std::string obfuscated_methodname(s.substr(arrow_end_pos)); in AddProguardMappingFile()
225 std::string obfuscated_classname(name.substr(0, split_pos)); in DeObfuscateJavaMethods()
229 std::string obfuscated_methodname(name.substr(split_pos + 1)); in DeObfuscateJavaMethods()
/aosp12/build/make/tools/droiddoc/templates-pdk/assets/
H A Dandroid-developer-reference.js229 if (toroot.substr(0, 1) == "/") {
230 if (full.substr(0, toroot.length) == toroot) {
231 return full.substr(toroot.length);
241 if (toroot.substr(toroot.length-3, 3) == "../" || toroot == "./") {
243 file = full.substr(pos) + file;
244 full = full.substr(0, pos);
245 toroot = toroot.substr(0, toroot.length-3);
248 return file.substr(1);
/aosp12/system/bt/gd/packet/parser/
H A Dmain.cc151 source_root = std::filesystem::path(arg.substr(arg_source_root.size())); in main()
158 out_dir = cwd / std::filesystem::path(arg.substr(arg_out.size())); in main()
160 include_dir = source_root / std::filesystem::path(arg.substr(arg_include.size())); in main()
162 root_namespace = arg.substr(arg_namespace.size()); in main()
164 num_shards = std::stoul(arg.substr(arg_num_shards.size())); in main()
/aosp12/hardware/nxp/secure_element/pn8x/libese-spi/p73/utils/
H A Dconfig.cpp70 value_string_ = in.substr(1, in.length() - 2); in parseFromString()
77 return parseBytesString(in.substr(1, in.length() - 2), value_bytes_); in parseFromString()
110 string key(Trim(line.substr(0, search))); in parseFromString()
111 string value_string(Trim(line.substr(search + 1, string::npos))); in parseFromString()

12345678910>>...21