← trim operator page · string/trim/sc/padded_input_value

Padded input value 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

trim(SC_1) with the input scalar SC_1 = " Hello ", two spaces at each end, quoted in the CSV so that they are kept.

Manual:

Whitespace removal: "Removes trailing or/and leading whitespace from a string. For example, trim("Hello ") gives "Hello"."

Expected:

SC_r is Hello, a String: both ends are trimmed.

script.vtl ⇩

SC_r := trim(SC_1);

input/scalars.csv ⇩

SC_1
Hello

input/scalars.json ⇩

{
  "scalars": [
    {
      "name": "SC_1",
      "type": "String"
    }
  ]
}

expected/scalars.json ⇩

{
  "scalars": [
    {"name": "SC_r", "type": "String", "value": "Hello"}
  ]
}