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

Padded input value 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

rtrim(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."

Expected:

SC_r is " Hello", a String: the two leading spaces are kept.

script.vtl ⇩

SC_r := rtrim(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"}
  ]
}