MCPcopy Create free account
hub / github.com/ashvardanian/StringZilla / partition

Method partition

include/stringzilla/stringzilla.hpp:2212–2212  ·  view source on GitHub ↗

@brief Split the string into three parts, before the match, the match itself, and after it. */

Source from the content-addressed store, hash-verified

2210
2211 /** @brief Split the string into three parts, before the match, the match itself, and after it. */
2212 partition_type partition(string_view pattern) const noexcept { return partition_(pattern, pattern.length()); }
2213
2214 /** @brief Split the string into three parts, before the match, the match itself, and after it. */
2215 partition_type partition(value_type pattern) const noexcept { return partition_(string_view(&pattern, 1), 1); }

Callers 2

test_unit_globalsFunction · 0.80
test_searchFunction · 0.80

Calls 1

lengthMethod · 0.45

Tested by 2

test_unit_globalsFunction · 0.64
test_searchFunction · 0.64