Home
last modified time | relevance | path

Searched refs:StringReplace (Results 1 – 25 of 38) sorted by relevance

12

/external/tensorflow/tensorflow/core/lib/strings/
Dstr_util_test.cc400 TEST(StringReplace, Basic) { in TEST() argument
401 EXPECT_EQ("XYZ_XYZ_XYZ", str_util::StringReplace("ABC_ABC_ABC", "ABC", "XYZ", in TEST()
405 TEST(StringReplace, OnlyFirst) { in TEST() argument
406 EXPECT_EQ("XYZ_ABC_ABC", str_util::StringReplace("ABC_ABC_ABC", "ABC", "XYZ", in TEST()
410 TEST(StringReplace, IncreaseLength) { in TEST() argument
412 str_util::StringReplace("abc", "b", " b ", /*replace_all=*/true)); in TEST()
415 TEST(StringReplace, IncreaseLengthMultipleMatches) { in TEST() argument
417 str_util::StringReplace("abbc", "b", " b ", /*replace_all=*/true)); in TEST()
420 TEST(StringReplace, NoChange) { in TEST() argument
422 str_util::StringReplace("abc", "d", "X", /*replace_all=*/true)); in TEST()
[all …]
/external/grpc-grpc/src/compiler/
Dpython_generator_helpers.h41 using grpc_generator::StringReplace;
58 basename = StringReplace(basename, "-", "_"); in ModuleName()
59 basename = StringReplace(basename, "/", "."); in ModuleName()
72 module_name = StringReplace(module_name, "_", "__"); in ModuleAlias()
73 module_name = StringReplace(module_name, ".", "_dot_"); in ModuleAlias()
Dcpp_generator_helpers.h30 return grpc_generator::StringReplace(name, ".", "::"); in DotsToColons()
34 return grpc_generator::StringReplace(name, ".", "_"); in DotsToUnderscores()
Dnode_generator.cc49 basename = grpc_generator::StringReplace(basename, "-", "$"); in ModuleAlias()
50 basename = grpc_generator::StringReplace(basename, "/", "_"); in ModuleAlias()
51 basename = grpc_generator::StringReplace(basename, ".", "_"); in ModuleAlias()
112 return grpc_generator::StringReplace(name, ".", "_"); in MessageIdentifierName()
Dgenerator_helpers.h61 inline grpc::string StringReplace(grpc::string str, const grpc::string& from, in StringReplace() function
77 inline grpc::string StringReplace(grpc::string str, const grpc::string& from, in StringReplace() function
79 return StringReplace(str, from, to, true); in StringReplace()
Dcsharp_generator.cc43 using grpc_generator::StringReplace;
66 comments = grpc_generator::StringReplace(comments, "&", "&", true); in GenerateDocCommentBodyImpl()
67 comments = grpc_generator::StringReplace(comments, "<", "&lt;", true); in GenerateDocCommentBodyImpl()
206 grpc_generator::StringReplace(message->full_name(), ".", "_", true); in GetMarshallerFieldName()
/external/tensorflow/tensorflow/core/grappler/costs/
Dutils.cc413 string name = str_util::StringReplace(device_name, "/job_", "/job:", true); in GetDeviceClassForNonChannelDevice()
414 name = str_util::StringReplace(name, "/replica_", "/replica:", true); in GetDeviceClassForNonChannelDevice()
415 name = str_util::StringReplace(name, "/task_", "/task:", true); in GetDeviceClassForNonChannelDevice()
416 name = str_util::StringReplace(name, "/device_", "/device:", true); in GetDeviceClassForNonChannelDevice()
417 name = str_util::StringReplace(name, "GPU_", "GPU:", true); in GetDeviceClassForNonChannelDevice()
418 name = str_util::StringReplace(name, "CPU_", "CPU:", true); in GetDeviceClassForNonChannelDevice()
419 name = str_util::StringReplace(name, "gpu_", "gpu:", true); in GetDeviceClassForNonChannelDevice()
420 name = str_util::StringReplace(name, "cpu_", "cpu:", true); in GetDeviceClassForNonChannelDevice()
/external/tensorflow/tensorflow/core/debug/
Ddebug_node_key.cc48 str_util::StringReplace( in DeviceNameToDevicePath()
49 str_util::StringReplace(device_name, ":", "_", true), "/", ",", in DeviceNameToDevicePath()
/external/tensorflow/tensorflow/core/framework/
Dop_gen_lib.cc250 static void StringReplace(const string& from, const string& to, string* s) { in StringReplace() function
277 StringReplace(from_quoted, to_quoted, in RenameInDocs()
283 StringReplace(from_quoted, to_quoted, in RenameInDocs()
289 StringReplace(from_quoted, to_quoted, in RenameInDocs()
294 StringReplace(from_quoted, to_quoted, api_def->mutable_summary()); in RenameInDocs()
297 StringReplace(from_quoted, to_quoted, api_def->mutable_description()); in RenameInDocs()
/external/protobuf/src/google/protobuf/compiler/csharp/
Dcsharp_doc_comment.cc57 comments = StringReplace(comments, "&", "&amp;", true); in WriteDocCommentBodyImpl()
58 comments = StringReplace(comments, "<", "&lt;", true); in WriteDocCommentBodyImpl()
Dcsharp_helpers.cc292 result += StringReplace(classname, ".", ".Types.", true); in ToCSharpName()
371 string namespace_dir = StringReplace(namespace_suffix, ".", "/", true); in GetOutputFile()
/external/perfetto/tools/proto_to_cpp/
Dproto_to_cpp.cc83 return StringReplace(proto_file->name(), ".proto", ".pb.h", false); in GetProtoHeader()
151 return header_dir_ + "/" + StringReplace(basename, ".proto", ".h", false); in GetHeaderPath()
156 return cpp_dir_ + "/" + StringReplace(basename, ".proto", ".cc", false); in GetCppPath()
161 return include_path_ + "/" + StringReplace(basename, ".proto", ".h", false); in GetIncludePath()
/external/tensorflow/tensorflow/tools/graph_transforms/
Dsparsify_gather.cc34 using str_util::StringReplace;
241 auto parsed_input = StringReplace(input, "^", "", true); in SparsifyGatherInternal()
348 auto parsed_input = StringReplace(input_node, "^", "", true); in SparsifyGatherInternal()
498 auto parsed_input = StringReplace(input, "^", "", true); in SparsifyGatherInternal()
/external/tensorflow/tensorflow/core/profiler/internal/
Dtfprof_node.cc214 node_.set_host_device(StringReplace(dev, "device:sycl:\\d+", "cpu:0")); in AddStepStat()
216 node_.set_host_device(StringReplace(dev, "gpu:\\d+", "cpu:0")); in AddStepStat()
Dtfprof_utils.h41 string StringReplace(const string& str, const string& oldsub,
Dtfprof_show_test.cc213 StringReplace(CheckAndRemoveDoc(dump_str), " ", "")); in TEST_F()
/external/protobuf/src/google/protobuf/compiler/cpp/
Dcpp_helpers.cc60 return StringReplace(name, ".", "_", true); in DotsToUnderscores()
64 return StringReplace(name, ".", "::", true); in DotsToColons()
467 return StringReplace(to_escape, "?", "\\?", true); in EscapeTrigraphs()
Dcpp_extension.cc146 string global_name = StringReplace(name, "::", "_", true); in GenerateDefinition()
/external/protobuf/src/google/protobuf/compiler/
Dcommand_line_interface_unittest.cc344 args[i] = StringReplace(args[i], "$tmpdir", temp_directory_, true); in Run()
382 full_name, StringReplace(contents, "$tmpdir", temp_directory_, true), in Run()
400 EXPECT_EQ(StringReplace(expected_text, "$tmpdir", temp_directory_, true), in Run()
494 EXPECT_EQ(StringReplace(content, "$tmpdir", temp_directory_, true), in Run()
Dimporter.cc267 path = "\\\\" + StringReplace(path.substr(2), "\\", "/", true); in CanonicalizePath()
269 path = StringReplace(path, "\\", "/", true); in CanonicalizePath()
/external/protobuf/src/google/protobuf/testing/
Dgoogletest.cc118 result = StringReplace(result, "\\", "/", true); in GetTemporaryDirectoryName()
/external/protobuf/src/google/protobuf/compiler/javanano/
Djavanano_generator.cc201 StringReplace(file_generator.java_package(), ".", "/", true); in Generate()
/external/protobuf/src/google/protobuf/compiler/javamicro/
Djavamicro_generator.cc171 StringReplace(file_generator.java_package(), ".", "/", true); in Generate()
/external/protobuf/src/google/protobuf/compiler/java/
Djava_helpers.cc152 return "static_" + StringReplace(descriptor->full_name(), ".", "_", true); in UniqueFileScopeIdentifier()
186 StringReplace(package_name, ".", "/", true); in JavaPackageToDir()
/external/protobuf/src/google/protobuf/compiler/objectivec/
Dobjectivec_helpers.cc264 return StringReplace(to_escape, "?", "\\?", true); in EscapeTrigraphs()
827 const string line = StringReplace(lines[i], "\\", "\\\\", true); in BuildCommentsString()
829 prefix + StringReplace(line, "@", "\\@", true) + suffix; in BuildCommentsString()

12