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

Padded input value 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

ltrim(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 trailing spaces are kept.

script.vtl ⇩

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