Method: Polars::StringExpr#decode
- Defined in:
- lib/polars/string_expr.rb
permalink #decode(encoding, strict: true) ⇒ Expr
Decode a value using the provided encoding.
873 874 875 876 877 878 879 880 881 |
# File 'lib/polars/string_expr.rb', line 873 def decode(encoding, strict: true) if encoding == "hex" Utils.wrap_expr(_rbexpr.str_hex_decode(strict)) elsif encoding == "base64" Utils.wrap_expr(_rbexpr.str_base64_decode(strict)) else raise ArgumentError, "encoding must be one of {{'hex', 'base64'}}, got #{encoding}" end end |