MCPcopy Create free account
hub / github.com/apache/arrow / StringClassifyDoc

Function StringClassifyDoc

cpp/src/arrow/compute/kernels/scalar_string_internal.h:192–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192static inline FunctionDoc StringClassifyDoc(std::string class_summary,
193 std::string class_desc, bool non_empty) {
194 std::string summary, description;
195 {
196 std::stringstream ss;
197 ss << "Classify strings as " << class_summary;
198 summary = ss.str();
199 }
200 {
201 std::stringstream ss;
202 if (non_empty) {
203 ss
204 << ("For each string in `strings`, emit true iff the string is non-empty\n"
205 "and consists only of ");
206 } else {
207 ss
208 << ("For each string in `strings`, emit true iff the string consists only\n"
209 "of ");
210 }
211 ss << class_desc << ". Null strings emit null.";
212 description = ss.str();
213 }
214 return StringPredicateDoc(std::move(summary), std::move(description));
215}
216
217template <typename Type, typename Predicate>
218struct StringPredicateFunctor {

Callers 2

Calls 2

StringPredicateDocFunction · 0.85
strMethod · 0.80

Tested by

no test coverage detected