/system/core/logd/ |
D | PruneList.cpp | 49 bool PruneList::Init(const char* str) { in Init() argument 54 if (str && !strcmp(str, "default")) { in Init() 55 str = nullptr; in Init() 57 if (str && !strcmp(str, "disable")) { in Init() 58 str = ""; in Init() 63 if (str) { in Init() 64 filter = str; in Init() 85 for (str = filter.c_str(); *str; ++str) { in Init() 86 if (isspace(*str)) { in Init() 91 if (*str == '~' || *str == '!') { // ~ supported, ! undocumented in Init() [all …]
|
D | LogAudit.cpp | 102 static inline bool hasMetadata(char* str, int str_len) { in hasMetadata() argument 109 (str[str_len - 9] == '/' || str[str_len - 39] == '/'); in hasMetadata() 181 char* str = nullptr; in logPrint() local 183 int rc = vasprintf(&str, fmt, args); in logPrint() 193 while ((cp = strchr(str, '\n'))) { in logPrint() 197 while ((cp = strstr(str, " "))) { in logPrint() 204 char* pidptr = strstr(str, pid_str); in logPrint() 217 bool info = strstr(str, " permissive=1") || strstr(str, " policy loaded "); in logPrint() 225 auditParse(str, uid, &denial_metadata); in logPrint() 228 iov[1].iov_base = str; in logPrint() [all …]
|
/system/bt/gd/common/ |
D | strings.cc | 50 bool IsValidHexString(const std::string& str) { in IsValidHexString() argument 51 return std::find_if_not(str.begin(), str.end(), IsHexDigit{}) == str.end(); in IsValidHexString() 54 std::optional<std::vector<uint8_t>> FromHexString(const std::string& str) { in FromHexString() argument 55 if (str.size() % 2 != 0) { in FromHexString() 56 LOG_DEBUG("str size is not divisible by 2, size is %zu", str.size()); in FromHexString() 59 if (std::find_if_not(str.begin(), str.end(), IsHexDigit{}) != str.end()) { in FromHexString() 64 value.reserve(str.size() / 2); in FromHexString() 65 for (size_t i = 0; i < str.size(); i += 2) { in FromHexString() 67 auto ret = std::from_chars(str.c_str() + i, str.c_str() + i + 2, v, 16); in FromHexString() 77 std::string StringTrim(std::string str) { in StringTrim() argument [all …]
|
D | strings.h | 45 return ss.str(); in ToHexString() 51 bool IsValidHexString(const std::string& str); 54 std::optional<std::vector<uint8_t>> FromHexString(const std::string& str); 57 std::string StringTrim(std::string str); 60 std::vector<std::string> StringSplit(const std::string& str, const std::string& delim, size_t max_t… 66 std::optional<int64_t> Int64FromString(const std::string& str); 68 std::optional<uint64_t> Uint64FromString(const std::string& str); 70 std::optional<bool> BoolFromString(const std::string& str);
|
/system/core/liblog/tests/ |
D | liblog_host_test.cpp | 82 CheckMessage(false, captured_stderr.str(), ANDROID_LOG_VERBOSE, "tag", "verbose main"); in TEST() 83 CheckMessage(true, captured_stderr.str(), ANDROID_LOG_INFO, "tag", "info main"); in TEST() 84 CheckMessage(true, captured_stderr.str(), ANDROID_LOG_ERROR, "tag", "error main"); in TEST() 86 CheckMessage(false, captured_stderr.str(), ANDROID_LOG_VERBOSE, "tag", "verbose radio"); in TEST() 87 CheckMessage(true, captured_stderr.str(), ANDROID_LOG_INFO, "tag", "info radio"); in TEST() 88 CheckMessage(true, captured_stderr.str(), ANDROID_LOG_ERROR, "tag", "error radio"); in TEST() 90 CheckMessage(false, captured_stderr.str(), ANDROID_LOG_VERBOSE, "tag", "verbose system"); in TEST() 91 CheckMessage(true, captured_stderr.str(), ANDROID_LOG_INFO, "tag", "info system"); in TEST() 92 CheckMessage(true, captured_stderr.str(), ANDROID_LOG_ERROR, "tag", "error system"); in TEST() 94 CheckMessage(false, captured_stderr.str(), ANDROID_LOG_VERBOSE, "tag", "verbose crash"); in TEST() [all …]
|
/system/core/adb/client/ |
D | mdns_utils_test.cpp | 26 std::string str = "."; in TEST() local 27 auto res = mdns_parse_instance_name(str); in TEST() 29 EXPECT_EQ(str, res->instance_name); in TEST() 34 std::string str = "my.name"; in TEST() local 35 auto res = mdns_parse_instance_name(str); in TEST() 37 EXPECT_EQ(str, res->instance_name); in TEST() 42 std::string str = "my.name."; in TEST() local 43 auto res = mdns_parse_instance_name(str); in TEST() 45 EXPECT_EQ(str, res->instance_name); in TEST() 53 std::string str = android::base::StringPrintf("%s", transport.data()); in TEST() local [all …]
|
/system/core/libpixelflinger/tests/arch-arm64/assembler/ |
D | asm_test_jacket.S | 170 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/libutils/ |
D | Unicode_test.cpp | 43 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 …]
|
D | String16.cpp | 78 char16_t* str = (char16_t*)buf->data(); in allocFromUTF16() local 79 memcpy(str, u16str, u16len * sizeof(char16_t)); in allocFromUTF16() 80 str[u16len] = 0; in allocFromUTF16() 81 return str; in allocFromUTF16() 180 char16_t* str = (char16_t*)buf->data(); in setTo() local 181 memmove(str, other, len*sizeof(char16_t)); in setTo() 182 str[len] = 0; in setTo() 183 mString = str; in setTo() 208 char16_t* str = (char16_t*)buf->data(); in append() local 209 memcpy(str+myLen, other, (otherLen+1)*sizeof(char16_t)); in append() [all …]
|
D | String8.cpp | 46 char* str = static_cast<char*>(buf->data()); in getEmptyString() local 47 *str = 0; in getEmptyString() 66 char* str = (char*)buf->data(); in allocFromUTF8() local 67 memcpy(str, in, len); in allocFromUTF8() 68 str[len] = 0; in allocFromUTF8() 69 return str; in allocFromUTF8() 331 char* str = (char*)buf->data(); in real_append() local 332 mString = str; in real_append() 333 str += myLen; in real_append() 334 memcpy(str, other, otherLen); in real_append() [all …]
|
/system/bt/osi/test/ |
D | allocator_test.cc | 29 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/libbase/include/android-base/ |
D | test_utils.h | 30 std::string str(); 56 #define ASSERT_MATCH(str, pattern) \ argument 58 auto __s = (str); \ 64 #define ASSERT_NOT_MATCH(str, pattern) \ argument 66 auto __s = (str); \ 72 #define EXPECT_MATCH(str, pattern) \ argument 74 auto __s = (str); \ 80 #define EXPECT_NOT_MATCH(str, pattern) \ argument 82 auto __s = (str); \
|
/system/tools/aidl/ |
D | code_writer_unittest.cpp | 30 string str; in TEST() local 31 CodeWriterPtr ptr = CodeWriter::ForString(&str); in TEST() 35 EXPECT_EQ(str, "Write this"); in TEST() 39 string str; in TEST() local 40 CodeWriterPtr ptr = CodeWriter::ForString(&str); in TEST() 44 EXPECT_EQ(str, "Write this and that"); in TEST()
|
/system/core/adb/ |
D | adb_utils.h | 100 inline std::string_view StripTrailingNulls(std::string_view str) { in StripTrailingNulls() argument 102 for (auto it = str.rbegin(); it != str.rend(); ++it) { in StripTrailingNulls() 109 str.remove_suffix(n); in StripTrailingNulls() 110 return str; in StripTrailingNulls() 115 inline bool ParseUint(T* result, std::string_view str, std::string_view* remaining = nullptr) { 117 const auto res = std::from_chars(str.begin(), str.end(), value); 121 if (res.ptr != str.end() && !remaining) { 125 *remaining = std::string_view(res.ptr, str.end() - res.ptr);
|
D | adb_io.cpp | 46 auto str = android::base::StringPrintf("%04x", length).append(s); in SendProtocolString() local 47 return WriteFdExactly(fd, str); in SendProtocolString() 132 bool WriteFdExactly(borrowed_fd fd, const char* str) { in WriteFdExactly() argument 133 return WriteFdExactly(fd, str, strlen(str)); in WriteFdExactly() 136 bool WriteFdExactly(borrowed_fd fd, const std::string& str) { in WriteFdExactly() argument 137 return WriteFdExactly(fd, str.c_str(), str.size()); in WriteFdExactly() 141 std::string str; in WriteFdFmt() local 145 android::base::StringAppendV(&str, fmt, ap); in WriteFdFmt() 148 return WriteFdExactly(fd, str); in WriteFdFmt()
|
/system/update_engine/scripts/update_payload/ |
D | histogram_unittest.py | 37 return '%s (%s)' % (size, fmt) if fmt else str(size) 47 self.CompareToExpectedDefault(str(histogram.Histogram( 51 self.CompareToExpectedDefault(str(histogram.Histogram.FromCountDict( 55 self.CompareToExpectedDefault(str(histogram.Histogram.FromKeyList( 63 actual_str = str(histogram.Histogram([('Yes', 5), ('No', 1)], scale=5)) 71 actual_str = str(histogram.Histogram(
|
/system/tools/hidl/ |
D | hidl-gen_l.ll | 83 std::string str(yytext); 86 yylloc->lines(std::count(str.begin(), str.end(), '\n')); 88 str = StringHelper::LTrim(str, "/"); 89 bool isDoc = StringHelper::StartsWith(str, "**"); 90 str = StringHelper::LTrimAll(str, "*"); 91 str = StringHelper::RTrim(str, "/"); 92 str = StringHelper::RTrimAll(str, "*"); 94 yylval->str = strdup(str.c_str()); 175 {COMPONENT} { yylval->str = strdup(yytext); return token::IDENTIFIER; } 176 {FQNAME} { yylval->str = strdup(yytext); return token::FQNAME; } [all …]
|
/system/chre/apps/chqts/src/shared/ |
D | nano_string_test.cc | 100 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/libbase/ |
D | test_utils_test.cpp | 52 ASSERT_EQ("This should be captured.\n", cap.str()); in TEST() 57 ASSERT_EQ("This should be captured.\nAnd this text should be captured too.\n", cap.str()); in TEST() 63 ASSERT_EQ("Only this will be captured.\n", cap.str()); in TEST() 71 ASSERT_EQ("This should be captured.\n", cap.str()); in TEST() 76 ASSERT_EQ("This should be captured.\nAnd this text should be captured too.\n", cap.str()); in TEST() 82 ASSERT_EQ("Only this will be captured.\n", cap.str()); in TEST()
|
/system/extras/tests/bootloader/ |
D | bootctl.py | 41 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/gd/hci/ |
D | enum_helper.h | 37 std::optional<hci::DeviceType> FromLegacyConfigString(const std::string& str) { in FromLegacyConfigString() argument 38 auto raw_value = common::Int64FromString(str); in FromLegacyConfigString() 50 std::optional<hci::AddressType> FromLegacyConfigString(const std::string& str) { in FromLegacyConfigString() argument 51 auto raw_value = common::Int64FromString(str); in FromLegacyConfigString() 64 std::optional<hci::KeyType> FromLegacyConfigString(const std::string& str) { in FromLegacyConfigString() argument 65 auto raw_value = common::Int64FromString(str); in FromLegacyConfigString() 78 std::optional<hci::LegacyScanMode> FromLegacyConfigString(const std::string& str) { in FromLegacyConfigString() argument 79 auto raw_value = common::Int64FromString(str); in FromLegacyConfigString()
|
/system/bt/osi/src/ |
D | allocator.cc | 27 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()
|
/system/bt/service/common/bluetooth/util/ |
D | atomic_string.cc | 21 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/bt/gd/storage/ |
D | serializable.h | 39 static std::optional<T> FromString(const std::string& str) { in FromString() argument 40 return T::FromString(str); in FromString() 49 static std::optional<T> FromLegacyConfigString(const std::string& str) { in FromLegacyConfigString() argument 50 return T::FromLegacyConfigString(str); in FromLegacyConfigString()
|
/system/teeui/libteeui/include/teeui/ |
D | cbor.h | 88 template <size_t size> StringBuffer<char, TextStr> text(const char (&str)[size]) { 89 if (size > 0) return StringBuffer<char, TextStr>(str, size - 1); 90 return StringBuffer<char, TextStr>(str, size); 96 template <size_t size> StringBuffer<char, TextStr> text_keep_last(const char (&str)[size]) { 97 return StringBuffer<char, TextStr>(str, size); 109 auto text(const T& str) -> StringBuffer<std::decay_t<decltype(*getData(str))>, TextStr> { 110 return StringBuffer<std::decay_t<decltype(*getData(str))>, TextStr>(getData(str), str.size()); 113 inline StringBuffer<char, TextStr> text(const char* str, size_t size) { 114 return StringBuffer<char, TextStr>(str, size); 117 template <typename T, size_t size> StringBuffer<T, ByteStr> bytes(const T (&str)[size]) { [all …]
|