| 907 | explicit Utf8PadTransform(const PadOptions& options) : options_(options) {} |
| 908 | |
| 909 | Status PreExec(KernelContext* ctx, const ExecSpan& batch, ExecResult* out) override { |
| 910 | auto str = reinterpret_cast<const uint8_t*>(options_.padding.data()); |
| 911 | auto strlen = options_.padding.size(); |
| 912 | if (util::UTF8Length(str, str + strlen) != 1) { |
| 913 | return Status::Invalid("Padding must be one codepoint, got '", options_.padding, |
| 914 | "'"); |
| 915 | } |
| 916 | return Status::OK(); |
| 917 | } |
| 918 | |
| 919 | int64_t MaxCodeunits(int64_t ninputs, int64_t input_ncodeunits) override { |
| 920 | // This is likely very overallocated but hard to do better without |
nothing calls this directly
no test coverage detected