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

Function StringClassifyDoc

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

Source from the content-addressed store, hash-verified

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

Callers 2

Calls 2

StringPredicateDocFunction · 0.85
strMethod · 0.80

Tested by

no test coverage detected