Home
last modified time | relevance | path

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

123456

/frameworks/minikin/tests/unittest/
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()
/frameworks/native/libs/ftl/
Dhash_test.cpp34 EXPECT_EQ(6278090252846864564ull, ftl::stable_hash(std::string_view(string).substr(0, 8))); in TEST()
35 EXPECT_EQ(1883356980931444616ull, ftl::stable_hash(std::string_view(string).substr(0, 16))); in TEST()
36 EXPECT_EQ(8073093283835059304ull, ftl::stable_hash(std::string_view(string).substr(0, 32))); in TEST()
/frameworks/native/cmds/servicemanager/
DNameUtil.h50 nname->package = name.substr(0, slash); in fill()
51 nname->instance = name.substr(slash + 1); in fill()
/frameworks/av/media/module/libmediaformatshaper/
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()
/frameworks/compile/mclinker/lib/Support/
DPath.cpp161 return Path(m_PathName.substr(0, end_pos)); in parent_path()
169 return Path(m_PathName.substr(pos)); in filename()
177 Path result_path(m_PathName.substr(begin_pos, end_pos - begin_pos)); in stem()
185 return Path(m_PathName.substr(pos)); in extension()
/frameworks/base/tools/aapt2/compile/
DPseudolocaleGenerator.cpp158 const StringPiece16 substr = text.substr(cursor, span->first_char - cursor); in PseudolocalizeStyledString() local
159 cursor += substr.size(); in PseudolocalizeStyledString()
162 std::string new_substr = android::util::Utf16ToUtf8(substr); in PseudolocalizeStyledString()
185 const StringPiece16 substr = text.substr(cursor, parent_span->last_char - cursor + 1); in PseudolocalizeStyledString() local
186 cursor += substr.size(); in PseudolocalizeStyledString()
189 std::string new_substr = android::util::Utf16ToUtf8(substr); in PseudolocalizeStyledString()
208 localizer.Text(android::util::Utf16ToUtf8(text.substr(cursor, text.size() - cursor))); in PseudolocalizeStyledString()
265 result += localizer_.Text(original_string.substr(start, len)); in Visit()
269 result += original_string.substr(section.start, section.end - section.start); in Visit()
276 result += localizer_.Text(original_string.substr(start, len)); in Visit()
/frameworks/base/tools/streaming_proto/
Dstring_utils.cpp76 return str.substr(start, end-start); in file_base_name()
100 string part = str.substr(base, found - base); in split()
119 return str.substr(i); in stripPrefix()
/frameworks/base/services/incremental/
Dpath.cpp80 auto relative = nested.substr(parent.size()); in relativize()
115 auto part = path.substr(start, end - start); in normalize()
153 return path.substr(pos + 1); in basename()
170 return path.substr(0, pos); in dirname()
/frameworks/av/media/codec2/vndk/util/
DC2ParamUtils.cpp73 C2_LOG(VERBOSE) << name.substr(0, word_start) << "|" in camelCaseToDashed()
74 << name.substr(word_start, ix - word_start) << "[" in camelCaseToDashed()
75 << name.substr(ix, 1) << "]" << name.substr(ix + 1) in camelCaseToDashed()
/frameworks/base/cmds/incident_helper/src/
Dih_util.cpp38 return s.substr(head, tail - head + 1); in trim()
71 std::string word = (*func) (line.substr(base, found - base)); in split()
139 record.push_back(trimDefault(line.substr(lastIndex, idx - lastIndex))); in parseRecordByColumns()
151 record.push_back(trimDefault(line.substr(beginning, lineSize - beginning))); in parseRecordByColumns()
186 line->assign(trimDefault(line->substr(j))); in stripPrefix()
207 line->assign(trimDefault(line->substr(0, j+1))); in stripSuffix()
214 std::string head = line->substr(0); in behead()
218 std::string head = line->substr(0, found); in behead()
220 line->assign(line->substr(found)); in behead()
/frameworks/native/cmds/installd/
Dsystem_properties.h40 std::string key = line.substr(0, equals_pos); in Load()
41 std::string value = line.substr(equals_pos + 1, in Load()
/frameworks/native/cmds/lshal/
Dutils.cpp33 components.push_back(s.substr(startPos, matchPos - startPos)); in split()
38 components.push_back(s.substr(startPos)); in split()
/frameworks/rs/script_api/
DScanner.cpp158 *documentation = s->substr(first, last - first); in parseDocumentation()
170 p->testOption = s.substr(optionStart + 2); in parseArgString()
187 p->name = s.substr(nameStart + 1); in parseArgString()
DUtilities.cpp104 out += in.substr(start); in stripHtml()
107 out += in.substr(start, lt - start); in stripHtml()
173 addCommaSeparated(userAttribute.substr(1), &stream, &needComma); in makeAttributeTag()
/frameworks/base/tools/validatekeymaps/
DMain.cpp35 static bool containsSubstringCaseInsensitive(std::string_view str, std::string_view substr) { in containsSubstringCaseInsensitive() argument
36 auto it = std::search(str.begin(), str.end(), substr.begin(), substr.end(), in containsSubstringCaseInsensitive()
/frameworks/libs/binary_translation/base/
Dconfig_globals.cc66 if (prop_name.size() > 3 && prop_name.substr(0, 3) == "ro." && in TryReadBionicSystemProperty()
67 TryReadBionicSystemPropertyImpl(prop_name.substr(3), value_ptr)) { in TryReadBionicSystemProperty()
/frameworks/native/services/vr/performanced/
Dtask.cpp105 return android::base::Trim(line.substr(offset + field.size() + 1)); in GetStatusField()
125 std::string key = line.substr(0, offset); in ReadStatusFields()
126 std::string value = android::base::Trim(line.substr(offset + 1)); in ReadStatusFields()
/frameworks/compile/mclinker/lib/LD/
DRelocator.cpp59 sect_name = sect_name.substr(sect_name.find('.', /*pos=*/1)); in issueUndefRef()
68 if (sect_name.substr(0, 5) != ".text") { in issueUndefRef()
/frameworks/base/tools/aapt2/xml/
DXmlUtil.cpp40 package = package.substr(schema_prefix.size(), package.size() - schema_prefix.size()); in ExtractPackageFromNamespace()
49 package = package.substr(schema_prefix.size(), package.size() - schema_prefix.size()); in ExtractPackageFromNamespace()
/frameworks/minikin/libs/minikin/
DStringPiece.h41 inline StringPiece substr(size_t from, size_t length) const { in substr() function
101 return mString.substr(searchFrom, mCurrent - searchFrom); in next()
DLineBreakerUtil.h90 hyphenate(textBuf.substr(hyphenationTargetRange), hyphenator); in populateHyphenationPoints()
99 U16StringPiece firstText = textBuf.substr(hyphenPart.first); in populateHyphenationPoints()
100 U16StringPiece secondText = textBuf.substr(hyphenPart.second); in populateHyphenationPoints()
/frameworks/base/tests/BackgroundDexOptServiceIntegrationTests/src/com/android/server/pm/
DBackgroundDexOptServiceIntegrationTests.java175 final String substr = "[status="; in getCompilerFilter() local
177 int startIndex = line.indexOf(substr); in getCompilerFilter()
181 startIndex += substr.length(); in getCompilerFilter()
/frameworks/base/tools/aapt2/util/
DUtil.cpp76 return str.substr(0, prefix.size()) == prefix; in StartsWith()
83 return str.substr(str.size() - suffix.size(), suffix.size()) == suffix; in EndsWith()
243 !android::base::ParseInt(parts[2].substr(0, 4), &buildYear) || in GetToolFingerprint()
244 !android::base::ParseInt(parts[2].substr(4, 2), &buildMonth)) { in GetToolFingerprint()
/frameworks/compile/libbcc/tools/bcc/
DMain.cpp174 std::string name = plan.substr(0, found); in extractSourcesAndSlots()
178 std::istringstream iss(plan.substr(found + 1)); in extractSourcesAndSlots()
183 std::string sourceStr = s.substr(0, found); in extractSourcesAndSlots()
184 std::string slotStr = s.substr(found + 1); in extractSourcesAndSlots()
/frameworks/base/tools/aapt2/filter/
DAbiFilter.cpp47 const auto path_abi = path.substr(kLibPrefixLen, abi_end - kLibPrefixLen); in Keep()

123456