MCPcopy Create free account
hub / github.com/bytedance/bolt / javaStyleSplit

Function javaStyleSplit

bolt/functions/lib/string/JavaStyleSplit.h:248–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246
247template <bool isSpark34Plus = false>
248static std::vector<std::string_view> javaStyleSplit(
249 std::string_view input,
250 std::string_view pattern,
251 int32_t limit) {
252 if (pattern.size() == 0) {
253 return javaStyleSplitFastEmptyPattern<isSpark34Plus>(input, pattern, limit);
254 } else {
255 std::string new_pattern = std::string(pattern);
256 auto isRegex = stringCore::checkRegexPattern(new_pattern);
257 if (!isRegex) {
258 return javaStyleSplitFast(input, new_pattern, limit);
259 } else {
260 return javaStyleSplitRegex(input, pattern, limit);
261 }
262 }
263}
264
265} // namespace javaStyle
266} // namespace bytedance::bolt::functions

Callers 1

TEST_FFunction · 0.85

Calls 4

checkRegexPatternFunction · 0.85
javaStyleSplitFastFunction · 0.85
javaStyleSplitRegexFunction · 0.85
sizeMethod · 0.45

Tested by 1

TEST_FFunction · 0.68