Home
last modified time | relevance | path

Searched refs:str (Results 1 – 25 of 284) sorted by relevance

12345678910>>...12

/system/core/libunwindstack/
DMaps.cpp65 char* str; in InternalParseLine() local
67 uint64_t start = strtoull(old_str, &str, 16); in InternalParseLine()
68 if (old_str == str || *str++ != '-') { in InternalParseLine()
72 old_str = str; in InternalParseLine()
73 uint64_t end = strtoull(old_str, &str, 16); in InternalParseLine()
74 if (old_str == str || !std::isspace(*str++)) { in InternalParseLine()
78 while (std::isspace(*str)) { in InternalParseLine()
79 str++; in InternalParseLine()
83 if (*str == '\0') { in InternalParseLine()
87 if (*str == 'r') { in InternalParseLine()
[all …]
/system/core/logd/
DLogWhiteBlackList.cpp67 int PruneList::init(const char* str) { in init() argument
81 if (str && !strcmp(str, _default)) { in init()
82 str = NULL; in init()
85 if (str && !strcmp(str, _disable)) { in init()
86 str = ""; in init()
91 if (str) { in init()
92 filter = str; in init()
116 for (str = filter.c_str(); *str; ++str) { in init()
117 if (isspace(*str)) { in init()
122 if ((*str == '~') || (*str == '!')) { // ~ supported, ! undocumented in init()
[all …]
DLogAudit.cpp102 static inline bool hasMetadata(char* str, int str_len) { in hasMetadata() argument
109 (str[str_len - 9] == '/' || str[str_len - 39] == '/'); in hasMetadata()
174 char* str = NULL; in logPrint() local
176 int rc = vasprintf(&str, fmt, args); in logPrint()
186 while ((cp = strchr(str, '\n'))) { in logPrint()
190 while ((cp = strstr(str, " "))) { in logPrint()
193 bool info = strstr(str, " permissive=1") || strstr(str, " policy loaded "); in logPrint()
212 char* avcr = strstr(str, avc); in logPrint()
219 last_str = strdup(str); in logPrint()
248 last_str = strdup(str); in logPrint()
[all …]
/system/core/libpixelflinger/tests/arch-arm64/assembler/
Dasm_test_jacket.S170 str x0, [x28,#0]
171 str x1, [x28,#8]
172 str x2, [x28,#16]
173 str x3, [x28,#24]
174 str x4, [x28,#32]
175 str x5, [x28,#40]
176 str x6, [x28,#48]
177 str x7, [x28,#56]
178 str x8, [x28,#64]
179 str x9, [x28,#72]
[all …]
/system/core/base/include/android-base/
Dtest_utils.h74 #define ASSERT_MATCH(str, pattern) \ argument
76 if (!std::regex_search((str), std::regex((pattern)))) { \
77 FAIL() << "regex mismatch: expected " << (pattern) << " in:\n" << (str); \
81 #define ASSERT_NOT_MATCH(str, pattern) \ argument
83 if (std::regex_search((str), std::regex((pattern)))) { \
84 FAIL() << "regex mismatch: expected to not find " << (pattern) << " in:\n" << (str); \
88 #define EXPECT_MATCH(str, pattern) \ argument
90 if (!std::regex_search((str), std::regex((pattern)))) { \
91 ADD_FAILURE() << "regex mismatch: expected " << (pattern) << " in:\n" << (str); \
95 #define EXPECT_NOT_MATCH(str, pattern) \ argument
[all …]
/system/core/libutils/
DString16.cpp39 char16_t* str = (char16_t*)buf->data(); in initialize_string16() local
40 *str = 0; in initialize_string16()
42 gEmptyString = str; in initialize_string16()
91 char16_t* str = (char16_t*)buf->data(); in allocFromUTF16() local
92 memcpy(str, u16str, u16len * sizeof(char16_t)); in allocFromUTF16()
93 str[u16len] = 0; in allocFromUTF16()
94 return str; in allocFromUTF16()
203 char16_t* str = (char16_t*)buf->data(); in setTo() local
204 memmove(str, other, len*sizeof(char16_t)); in setTo()
205 str[len] = 0; in setTo()
[all …]
DString8.cpp66 char* str = (char*)buf->data(); in initialize_string8() local
67 *str = 0; in initialize_string8()
69 gEmptyString = str; in initialize_string8()
90 char* str = (char*)buf->data(); in allocFromUTF8() local
91 memcpy(str, in, len); in allocFromUTF8()
92 str[len] = 0; in allocFromUTF8()
93 return str; in allocFromUTF8()
374 char* str = (char*)buf->data(); in real_append() local
375 mString = str; in real_append()
376 str += myLen; in real_append()
[all …]
/system/core/libutils/tests/
DUnicode_test.cpp43 const uint8_t str[] = { }; in TEST_F() local
45 measured = utf8_to_utf16_length(str, 0); in TEST_F()
54 const uint8_t str[] = { 0x30 }; in TEST_F() local
56 measured = utf8_to_utf16_length(str, sizeof(str)); in TEST_F()
65 const uint8_t str[] = { 0xE2, 0x8C, 0xA3 }; in TEST_F() local
67 measured = utf8_to_utf16_length(str, sizeof(str)); in TEST_F()
76 const uint8_t str[] = { 0xF0, 0x90, 0x80, 0x80 }; in TEST_F() local
78 measured = utf8_to_utf16_length(str, sizeof(str)); in TEST_F()
88 const uint8_t str[] = { 0xE2, 0x8C }; in TEST_F() local
90 measured = utf8_to_utf16_length(str, sizeof(str)); in TEST_F()
[all …]
/system/bt/osi/test/
Dallocator_test.cc29 char str[] = "IloveBluetooth"; in TEST_F() local
30 size_t len = strlen(str); in TEST_F()
34 copy_str = osi_strndup(str, 0); in TEST_F()
39 copy_str = osi_strndup(str, len); in TEST_F()
40 EXPECT_EQ(0, strcmp(str, copy_str)); in TEST_F()
44 copy_str = osi_strndup(str, len - 5); in TEST_F()
49 copy_str = osi_strndup(str, len + 5); in TEST_F()
50 EXPECT_EQ(0, strcmp(str, copy_str)); in TEST_F()
/system/core/demangle/
DDemangler.cpp30 void Demangler::Save(const std::string& str, bool is_name) { in Save() argument
31 saves_.push_back(str); in Save()
263 const char* Demangler::GetStringFromLength(const char* name, std::string* str) { in GetStringFromLength() argument
284 *str += "(anonymous namespace)"; in GetStringFromLength()
286 *str += read_str; in GetStringFromLength()
291 void Demangler::AppendCurrent(const std::string& str) { in AppendCurrent() argument
292 if (!cur_state_.str.empty()) { in AppendCurrent()
293 cur_state_.str += "::"; in AppendCurrent()
295 cur_state_.str += str; in AppendCurrent()
298 void Demangler::AppendCurrent(const char* str) { in AppendCurrent() argument
[all …]
/system/extras/tests/sdcard/
Dstopwatch.cpp36 #define SNPRINTF_OR_RETURN(str, size, format, ...) { \ argument
37 int len = snprintf((str), (size), (format), ## __VA_ARGS__); \
43 (size) -= len; (str) += len; \
106 void StopWatch::sprint(char **str, size_t *size) in sprint() argument
118 if (kVerbose) SNPRINTF_OR_RETURN(*str, *size, "# Got %d samples for %s\n", mDataLen, mName); in sprint()
121 SNPRINTF_OR_RETURN(*str, *size, "# StopWatch %s total/cumulative duration %f Samples: %d\n", in sprint()
123 printThroughput(str, size); in sprint()
124 printAverageMinMax(str, size); in sprint()
130 … SNPRINTF_OR_RETURN(*str, *size, "# Name Iterations Duration Min MinIdx Max MaxIdx SizeKbytes\n"); in sprint()
131 SNPRINTF_OR_RETURN(*str, *size, "%s %d %f %f %d %f %d %d\n", mName, mNum, mDuration, in sprint()
[all …]
/system/core/libsync/
Dsync_test.c82 char str[256]; in main() local
95 snprintf(str, sizeof(str), "test_fence%d-%d", i, j); in main()
96 int fd = sw_sync_fence_create(sync_timeline_fd, str, val); in main()
109 snprintf(str, sizeof(str), "merged_fence%d", j); in main()
110 sync_data[3].fd[j] = sync_merge(str, sync_data[0].fd[j], sync_data[1].fd[j]); in main()
125 fgets(str, sizeof(str), stdin); in main()
134 fgets(str, sizeof(str), stdin); in main()
139 fgets(str, sizeof(str), stdin); in main()
/system/chre/util/include/chre/util/
Did_from_string_impl.h24 constexpr uint64_t createIdFromString(const char str[5]) { in createIdFromString()
25 return (static_cast<uint64_t>(str[0]) << 56) in createIdFromString()
26 | (static_cast<uint64_t>(str[1]) << 48) in createIdFromString()
27 | (static_cast<uint64_t>(str[2]) << 40) in createIdFromString()
28 | (static_cast<uint64_t>(str[3]) << 32) in createIdFromString()
29 | (static_cast<uint64_t>(str[4]) << 24); in createIdFromString()
/system/core/logcat/
Dlogcat_system.cpp35 std::string str(cp, delim); in unquote() local
37 return str; in unquote()
53 std::string str(env, ++cp); in __android_logcat_parse() local
54 str += unquote(cp, delim); in __android_logcat_parse()
55 envs.push_back(str); in __android_logcat_parse()
77 for (auto& str : args) { in android_logcat_popen() local
78 argv.push_back(str.c_str()); in android_logcat_popen()
83 for (auto& str : envs) { in android_logcat_popen() local
84 envp.push_back(str.c_str()); in android_logcat_popen()
131 for (auto& str : args) { in android_logcat_system() local
[all …]
/system/chre/apps/chqts/src/shared/
Dnano_string_test.cc100 const char *str = ""; in TEST() local
101 EXPECT_EQ(::strlen(str), nanoapp_testing::strlen(str)); in TEST()
105 const char *str = "random string\n"; in TEST() local
106 EXPECT_EQ(::strlen(str), nanoapp_testing::strlen(str)); in TEST()
114 static void testStrncpy(const char *str, size_t len) { in testStrncpy() argument
121 ::strncpy(expected, str, len); in testStrncpy()
122 nanoapp_testing::strncpy(actual, str, len); in testStrncpy()
151 static void testHexAscii(uint32_t value, const char *str) { in testHexAscii() argument
160 EXPECT_STREQ(str, array); in testHexAscii()
/system/update_engine/scripts/update_payload/
Dhistogram_unittest.py21 return '%s (%s)' % (size, fmt) if fmt else str(size)
31 self.CompareToExpectedDefault(str(histogram.Histogram(
35 self.CompareToExpectedDefault(str(histogram.Histogram.FromCountDict(
39 self.CompareToExpectedDefault(str(histogram.Histogram.FromKeyList(
47 actual_str = str(histogram.Histogram([('Yes', 5), ('No', 1)], scale=5))
55 actual_str = str(histogram.Histogram(
/system/core/adb/
Dadb_io.cpp126 bool WriteFdExactly(int fd, const char* str) { in WriteFdExactly() argument
127 return WriteFdExactly(fd, str, strlen(str)); in WriteFdExactly()
130 bool WriteFdExactly(int fd, const std::string& str) { in WriteFdExactly() argument
131 return WriteFdExactly(fd, str.c_str(), str.size()); in WriteFdExactly()
135 std::string str; in WriteFdFmt() local
139 android::base::StringAppendV(&str, fmt, ap); in WriteFdFmt()
142 return WriteFdExactly(fd, str); in WriteFdFmt()
/system/extras/tests/bootloader/
Dbootctl.py41 return self._exec("set-active-boot-slot " + str(slot))[0] == 0
46 return self._exec("set-slot-as-unbootable " + str(slot))[0] == 0
51 return self._exec("is-slot-bootable " + str(slot))[0] == 0
56 return self._exec("is-slot-marked-successful " + str(slot))[0] == 0
61 return self._exec("get-suffix " + str(slot))[1].strip()
/system/bt/osi/src/
Dallocator.cc27 char* osi_strdup(const char* str) { in osi_strdup() argument
28 size_t size = strlen(str) + 1; // + 1 for the null terminator in osi_strdup()
37 memcpy(new_string, str, size); in osi_strdup()
41 char* osi_strndup(const char* str, size_t len) { in osi_strndup() argument
42 size_t size = strlen(str); in osi_strndup()
53 memcpy(new_string, str, size); in osi_strndup()
Dhash_map_utils.cc35 char* str = osi_strdup(params); in hash_map_utils_new_from_string_params() local
36 if (!str) return map; in hash_map_utils_new_from_string_params()
38 LOG_VERBOSE(LOG_TAG, "%s: source string: '%s'", __func__, str); in hash_map_utils_new_from_string_params()
43 char* kvpair = strtok_r(str, ";", &tmpstr); in hash_map_utils_new_from_string_params()
74 osi_free(str); in hash_map_utils_new_from_string_params()
/system/tools/hidl/docs/src/lexer/
DILexer.kt22 fun tokenize(str: String): List<Token> in <lambda>()
30 fun padDelimiters(str: String): String { in <lambda>()
37 str.lineSequence().forEach { line -> in <lambda>()
60 private fun unpadDecimal(str: String): String { in <lambda>()
61 var newStr = str in <lambda>()
75 fun unpadDelimiters(str: String): String { in <lambda>()
76 var newStr = str in <lambda>()
/system/bt/service/common/bluetooth/util/
Datomic_string.cc21 AtomicString::AtomicString(const std::string& str) : str_(str) {} in AtomicString() argument
29 void AtomicString::Set(const std::string& str) { in Set() argument
31 str_ = str; in Set()
/system/tools/hidl/utils/
DFQName.cpp127 mPackage = match.str(1); in setTo()
128 invalid |= !parseVersion(match.str(2), match.str(3)); in setTo()
129 mName = match.str(4); in setTo()
133 invalid |= !parseVersion(match.str(1), match.str(2)); in setTo()
134 mName = match.str(3); in setTo()
138 mPackage = match.str(1); in setTo()
139 invalid |= !parseVersion(match.str(2), match.str(3)); in setTo()
141 mName = match.str(0); in setTo()
144 mName = match.str(0); in setTo()
148 mPackage = match.str(1); in setTo()
[all …]
/system/bt/bta/ag/
Dbta_ag_cmd.cc310 char str[12]; in bta_ag_send_ind() local
311 char* p = str; in bta_ag_send_ind()
366 bta_ag_send_result(p_scb, BTA_AG_IND_RES, str, 0); in bta_ag_send_ind()
605 if ((p_end - p_arg + 1) >= (long)sizeof(val.str)) { in bta_ag_at_hsp_cback()
611 strlcpy(val.str, p_arg, sizeof(val.str)); in bta_ag_at_hsp_cback()
617 static void remove_spaces(char* str) { in remove_spaces() argument
618 char* dest_str = str; in remove_spaces()
620 while (*str) { in remove_spaces()
621 if (*str == ' ') { in remove_spaces()
622 str++; in remove_spaces()
[all …]
/system/bt/bta/hf_client/
Dbta_hf_client_api.cc169 uint32_t val1, uint32_t val2, const char* str) { in BTA_HfClientSendAT() argument
178 if (str) { in BTA_HfClientSendAT()
179 strlcpy(p_buf->str, str, BTA_HF_CLIENT_NUMBER_LEN + 1); in BTA_HfClientSendAT()
180 p_buf->str[BTA_HF_CLIENT_NUMBER_LEN] = '\0'; in BTA_HfClientSendAT()
182 p_buf->str[0] = '\0'; in BTA_HfClientSendAT()

12345678910>>...12