Home
last modified time | relevance | path

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

12

/external/tensorflow/tensorflow/core/platform/
Dstr_util_test.cc338 TEST(StringReplace, Basic) { in TEST() argument
339 EXPECT_EQ("XYZ_XYZ_XYZ", str_util::StringReplace("ABC_ABC_ABC", "ABC", "XYZ", in TEST()
343 TEST(StringReplace, OnlyFirst) { in TEST() argument
344 EXPECT_EQ("XYZ_ABC_ABC", str_util::StringReplace("ABC_ABC_ABC", "ABC", "XYZ", in TEST()
348 TEST(StringReplace, IncreaseLength) { in TEST() argument
350 str_util::StringReplace("abc", "b", " b ", /*replace_all=*/true)); in TEST()
353 TEST(StringReplace, IncreaseLengthMultipleMatches) { in TEST() argument
355 str_util::StringReplace("abbc", "b", " b ", /*replace_all=*/true)); in TEST()
358 TEST(StringReplace, NoChange) { in TEST() argument
360 str_util::StringReplace("abc", "d", "X", /*replace_all=*/true)); in TEST()
[all …]
Dstr_util.h101 string StringReplace(StringPiece s, StringPiece oldsub, StringPiece newsub,
Dstr_util.cc139 string StringReplace(StringPiece s, StringPiece oldsub, StringPiece newsub, in StringReplace() function
/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/protobuf/src/google/protobuf/
Dtest_util2.h50 path = StringReplace(path, "internal/", "", false); in TranslatePathToOpensource()
51 path = StringReplace(path, "proto/", "", false); in TranslatePathToOpensource()
52 path = StringReplace(path, "public/", "", false); in TranslatePathToOpensource()
/external/tensorflow/tensorflow/core/grappler/costs/
Dutils.cc396 string name = str_util::StringReplace(device_name, "/job_", "/job:", true); in GetDeviceClassForNonChannelDevice()
397 name = str_util::StringReplace(name, "/replica_", "/replica:", true); in GetDeviceClassForNonChannelDevice()
398 name = str_util::StringReplace(name, "/task_", "/task:", true); in GetDeviceClassForNonChannelDevice()
399 name = str_util::StringReplace(name, "/device_", "/device:", true); in GetDeviceClassForNonChannelDevice()
400 name = str_util::StringReplace(name, "GPU_", "GPU:", true); in GetDeviceClassForNonChannelDevice()
401 name = str_util::StringReplace(name, "CPU_", "CPU:", true); in GetDeviceClassForNonChannelDevice()
402 name = str_util::StringReplace(name, "gpu_", "gpu:", true); in GetDeviceClassForNonChannelDevice()
403 name = str_util::StringReplace(name, "cpu_", "cpu:", true); in GetDeviceClassForNonChannelDevice()
/external/tensorflow/tensorflow/core/debug/
Ddebug_node_key.cc49 str_util::StringReplace( in DeviceNameToDevicePath()
50 str_util::StringReplace(device_name, ":", "_", true), "/", ",", in DeviceNameToDevicePath()
/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.cc311 result += StringReplace(classname, ".", ".Types.", true); in ToCSharpName()
397 string namespace_dir = StringReplace(namespace_suffix, ".", "/", true); in GetOutputFile()
/external/tensorflow/tensorflow/core/framework/
Dop_gen_lib.cc252 static void StringReplace(const string& from, const string& to, string* s) { in StringReplace() function
279 StringReplace(from_quoted, to_quoted, in RenameInDocs()
285 StringReplace(from_quoted, to_quoted, in RenameInDocs()
291 StringReplace(from_quoted, to_quoted, in RenameInDocs()
296 StringReplace(from_quoted, to_quoted, api_def->mutable_summary()); in RenameInDocs()
299 StringReplace(from_quoted, to_quoted, api_def->mutable_description()); in RenameInDocs()
/external/tensorflow/tensorflow/tools/graph_transforms/
Dsparsify_gather.cc33 using str_util::StringReplace;
240 auto parsed_input = StringReplace(input, "^", "", true); in SparsifyGatherInternal()
347 auto parsed_input = StringReplace(input_node, "^", "", true); in SparsifyGatherInternal()
497 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_extension.cc159 StringReplace(variables_["scoped_name"], "::", "_", true) + "_default"; in GenerateDefinition()
/external/protobuf/src/google/protobuf/compiler/
Dimporter.cc286 path = "\\\\" + StringReplace(path.substr(2), "\\", "/", true); in CanonicalizePath()
288 path = StringReplace(path, "\\", "/", true); in CanonicalizePath()
Dcommand_line_interface_unittest.cc344 args[i] = StringReplace(args[i], "$tmpdir", temp_directory_, true); in RunWithArgs()
381 full_name, StringReplace(contents, "$tmpdir", temp_directory_, true), in CreateTempFile()
400 EXPECT_EQ(StringReplace(expected_text, "$tmpdir", temp_directory_, true), in ExpectErrorText()
501 EXPECT_EQ(StringReplace(content, "$tmpdir", temp_directory_, true), in ExpectFileContent()
/external/protobuf/src/google/protobuf/compiler/objectivec/
Dobjectivec_helpers.cc356 return StringReplace(to_escape, "?", "\\?", true); in EscapeTrigraphs()
964 line = StringReplace(line, "\\", "\\\\", true); in BuildCommentsString()
965 line = StringReplace(line, "@", "\\@", true); in BuildCommentsString()
967 line = StringReplace(line, "/*", "/\\*", true); in BuildCommentsString()
968 line = StringReplace(line, "*/", "*\\/", true); in BuildCommentsString()
/external/protobuf/src/google/protobuf/testing/
Dgoogletest.cc153 result = StringReplace(result, "\\", "/", true); in GetTemporaryDirectoryName()
/external/protobuf/src/google/protobuf/compiler/javanano/
Djavanano_generator.cc191 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()

12