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