MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Split

Function Split

tensorflow/core/platform/str_util.h:121–124  ·  view source on GitHub ↗

Split strings using any of the supplied delimiters. For example: Split("a,b.c,d", ".,") would return {"a", "b", "c", "d"}.

Source from the content-addressed store, hash-verified

119// Split strings using any of the supplied delimiters. For example:
120// Split("a,b.c,d", ".,") would return {"a", "b", "c", "d"}.
121inline std::vector<string> Split(StringPiece text, StringPiece delims) {
122 return text.empty() ? std::vector<string>()
123 : absl::StrSplit(text, absl::ByAnyChar(delims));
124}
125
126template <typename Predicate>
127std::vector<string> Split(StringPiece text, StringPiece delims, Predicate p) {

Callers 15

TESTFunction · 0.70
CreateDirMethod · 0.70
IsDirectoryMethod · 0.70
ValidateHostPortPairFunction · 0.50
GetLocalStarPortMethod · 0.50
InitMethod · 0.50
ParseChannelSpecMethod · 0.50
HostNameToIpFunction · 0.50
FillServerDefMethod · 0.50
ParseFromStringMethod · 0.50

Calls 1

emptyMethod · 0.45

Tested by 15

TESTFunction · 0.56
CreateDirMethod · 0.56
IsDirectoryMethod · 0.56
ValidateHostPortPairFunction · 0.40
FillServerDefMethod · 0.40
ParseFromStringMethod · 0.40
ParseFromStringMethod · 0.40
ParseColumnsMethod · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40