Home
last modified time | relevance | path

Searched refs:c_string (Results 1 – 21 of 21) sorted by relevance

/external/python/cpython2/Lib/ctypes/test/
Dtest_strings.py84 cs = c_string("abcdef")
92 self.assertEqual(c_string("abc\000def").value, "abc")
96 self.assertEqual(c_string("abc\000def").raw, "abc\000def\000")
107 self.assertRaises(TypeError, c_string, u"123")
113 self.assertRaises(TypeError, c_string, None)
117 self.assertEqual(len(c_string(32).raw), 32)
118 self.assertRaises(ValueError, c_string, -1)
119 self.assertRaises(ValueError, c_string, 0)
124 self.assertEqual(c_string(2).raw[-1], "\000")
125 self.assertEqual(len(c_string(2).raw), 2)
[all …]
Dtest_funcptr.py110 def c_string(init): function
115 b = c_string(s)
/external/python/cpython3/Lib/ctypes/test/
Dtest_strings.py91 cs = c_string("abcdef")
99 self.assertEqual(c_string("abc\000def").value, "abc")
103 self.assertEqual(c_string("abc\000def").raw, "abc\000def\000")
114 self.assertRaises(TypeError, c_string, "123")
120 self.assertRaises(TypeError, c_string, None)
124 self.assertEqual(len(c_string(32).raw), 32)
125 self.assertRaises(ValueError, c_string, -1)
126 self.assertRaises(ValueError, c_string, 0)
131 self.assertEqual(c_string(2).raw[-1], "\000")
132 self.assertEqual(len(c_string(2).raw), 2)
[all …]
Dtest_funcptr.py110 def c_string(init): function
115 b = c_string(s)
/external/cpuinfo/scripts/
Darm-linux-filesystem-dump.py43 c_string = ""
46 c_string += "\\\\"
48 c_string += "\\\""
50 c_string += "\\t"
52 c_string += "\\n"
54 c_string += "\\r"
56 c_string += "\\0"
58 c_string += c
60 c_string += "x%02X" % ord(c)
61 return c_string
Dandroid-device-dump.py223 c_string = ""
226 c_string += "\\\\"
228 c_string += "\\\""
230 c_string += "\\t"
232 c_string += "\\n"
234 c_string += "\\r"
236 c_string += "\\0"
238 c_string += c
240 c_string += "x%02X" % ord(c)
241 return c_string
/external/rust/crates/quiche/deps/boringssl/src/third_party/googletest/samples/
Dsample2_unittest.cc69 EXPECT_STREQ(nullptr, s.c_string()); in TEST()
79 EXPECT_EQ(0, strcmp(s.c_string(), kHelloString)); in TEST()
88 EXPECT_EQ(0, strcmp(s2.c_string(), kHelloString)); in TEST()
96 EXPECT_EQ(0, strcmp(s.c_string(), kHelloString)); in TEST()
100 s.Set(s.c_string()); in TEST()
101 EXPECT_EQ(0, strcmp(s.c_string(), kHelloString)); in TEST()
105 EXPECT_STREQ(nullptr, s.c_string()); in TEST()
Dsample2.h72 const char* c_string() const { return c_string_; } in c_string() function
77 void Set(const char* c_string);
/external/googletest/googletest/samples/
Dsample2_unittest.cc69 EXPECT_STREQ(nullptr, s.c_string()); in TEST()
79 EXPECT_EQ(0, strcmp(s.c_string(), kHelloString)); in TEST()
88 EXPECT_EQ(0, strcmp(s2.c_string(), kHelloString)); in TEST()
96 EXPECT_EQ(0, strcmp(s.c_string(), kHelloString)); in TEST()
100 s.Set(s.c_string()); in TEST()
101 EXPECT_EQ(0, strcmp(s.c_string(), kHelloString)); in TEST()
105 EXPECT_STREQ(nullptr, s.c_string()); in TEST()
Dsample2.h72 const char* c_string() const { return c_string_; } in c_string() function
77 void Set(const char* c_string);
/external/gflags/src/
Dgflags_reporting.cc108 const char* c_string = (current ? flag.current_value.c_str() : in PrintStringFlagsWithQuotes() local
111 return StringPrintf("%s: \"%s\"", text.c_str(), c_string); in PrintStringFlagsWithQuotes()
113 return StringPrintf("%s: %s", text.c_str(), c_string); in PrintStringFlagsWithQuotes()
124 const char* c_string = main_part.c_str(); in DescribeOneFlag() local
130 == strlen(c_string)); // Unless there's a \0 in there? in DescribeOneFlag()
131 const char* newline = strchr(c_string, '\n'); in DescribeOneFlag()
134 final_string += c_string; in DescribeOneFlag()
138 if (newline != NULL && newline - c_string < kLineLength - chars_in_line) { in DescribeOneFlag()
139 int n = static_cast<int>(newline - c_string); in DescribeOneFlag()
140 final_string.append(c_string, n); in DescribeOneFlag()
[all …]
/external/tensorflow/tensorflow/python/framework/
Dpython_op_gen_wrapper.cc26 char* c_string; in PYBIND11_MODULE() local
28 if (PyBytes_AsStringAndSize(input.ptr(), &c_string, &py_size) == -1) { in PYBIND11_MODULE()
32 tensorflow::GetPythonWrappers(c_string, static_cast<size_t>(py_size))); in PYBIND11_MODULE()
/external/tensorflow/tensorflow/core/lib/png/
Dpng_io.cc117 const char* const c_string = s.c_str(); in check_metadata_string() local
119 if (strlen(c_string) != length) { in check_metadata_string()
122 return const_cast<char*>(c_string); in check_metadata_string()
/external/rust/crates/structopt/tests/
Dcustom-string-parsers.rs299 c_string: CString, in test_cstring() field
302 assert_eq!(Opt::from_iter(&["test", "bla"]).c_string.to_bytes(), b"bla"); in test_cstring()
/external/perfetto/src/trace_processor/importers/json/
Djson_trace_parser.cc52 const char* c_string = id.asCString(); in MaybeExtractFlowIdentifier() local
53 return base::CStringToUInt64(c_string, 16); in MaybeExtractFlowIdentifier()
/external/rust/crates/cexpr/src/
Dliteral.rs219 fn c_string(i: &[u8]) -> nom::IResult<&[u8], Vec<u8>> { in c_string() function
350 map(full(c_string), EvalResult::Str), in one_literal()
/external/tensorflow/tensorflow/python/client/
Dtf_session_wrapper.cc57 char* c_string; in ProtoStringToTFBuffer() local
60 if (PyBytes_AsStringAndSize(input, &c_string, &py_size) == -1) { in ProtoStringToTFBuffer()
64 return TF_NewBufferFromString(static_cast<void*>(c_string), in ProtoStringToTFBuffer()
/external/tensorflow/tensorflow/python/
Dtfe_wrapper.cc101 char* c_string; in ProtoStringToTFBuffer() local
104 if (PyBytes_AsStringAndSize(input, &c_string, &py_size) == -1) { in ProtoStringToTFBuffer()
108 return TF_NewBufferFromString(static_cast<void*>(c_string), in ProtoStringToTFBuffer()
/external/googletest/docs/
Dprimer.md194 that a C string is `NULL`, use `ASSERT_STREQ(c_string, NULL)`. Consider using
195 `ASSERT_EQ(c_string, nullptr)` if c++11 is supported. To compare two `string`
/external/python/cpython2/Doc/library/
Dctypes.rst330 (which is still available as an alias), as well as the :func:`c_string` function
/external/python/cpython3/Doc/library/
Dctypes.rst334 (which is still available as an alias), as well as the :func:`c_string` function