{
  "name": "Comparison of SAS Character Trimming and String Cleaning Functions",
  "description": "Functional matrix evaluating SAS string sanitation functions across whitespace removal scope, blank string return length, execution profile, and concatenation integration based on SAS Institute 9.2 documentation and UCLA OARC computing standards.",
  "page": "https://casrai.org/guides/strip-function-in-sas",
  "publisher": "CASRAI",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "dateModified": "2026-11-19T11:53:58Z",
  "temporalCoverage": null,
  "spatialCoverage": null,
  "columns": [
    {
      "name": "Function Name",
      "unit": "",
      "description": "SAS character manipulation function name"
    },
    {
      "name": "Leading Blanks Removed",
      "unit": "",
      "description": "Whether leading whitespace is deleted"
    },
    {
      "name": "Trailing Blanks Removed",
      "unit": "",
      "description": "Whether trailing whitespace is deleted"
    },
    {
      "name": "Inter-Word Blanks Removed",
      "unit": "",
      "description": "Behavior regarding spaces between words"
    },
    {
      "name": "Blank Input Return Length",
      "unit": "characters",
      "description": "Length of output string when input argument is all blanks"
    },
    {
      "name": "Execution Profile",
      "unit": "",
      "description": "Implementation architecture and relative performance"
    },
    {
      "name": "Concatenation Role",
      "unit": "",
      "description": "Behavior during string joining operations"
    }
  ],
  "rows": [
    {
      "Function Name": "STRIP",
      "Leading Blanks Removed": "Yes",
      "Trailing Blanks Removed": "Yes",
      "Inter-Word Blanks Removed": "Preserved",
      "Blank Input Return Length": 0,
      "Execution Profile": "Native C routine executing faster than nested TRIMN(LEFT())",
      "Concatenation Role": "Manual join with || operator"
    },
    {
      "Function Name": "TRIM",
      "Leading Blanks Removed": "No",
      "Trailing Blanks Removed": "Yes",
      "Inter-Word Blanks Removed": "Preserved",
      "Blank Input Return Length": 1,
      "Execution Profile": "Legacy string trimming routine",
      "Concatenation Role": "Preserves leading blanks in joins"
    },
    {
      "Function Name": "TRIMN",
      "Leading Blanks Removed": "No",
      "Trailing Blanks Removed": "Yes",
      "Inter-Word Blanks Removed": "Preserved",
      "Blank Input Return Length": 0,
      "Execution Profile": "Zero-length variant of TRIM",
      "Concatenation Role": "Eliminates single blank return on empty input"
    },
    {
      "Function Name": "LEFT",
      "Leading Blanks Removed": "Yes",
      "Trailing Blanks Removed": "Shifted to end",
      "Inter-Word Blanks Removed": "Preserved",
      "Blank Input Return Length": 1,
      "Execution Profile": "Left-alignment buffer shift",
      "Concatenation Role": "Pads trailing spaces up to declared length"
    },
    {
      "Function Name": "COMPRESS",
      "Leading Blanks Removed": "Yes",
      "Trailing Blanks Removed": "Yes",
      "Inter-Word Blanks Removed": "All removed",
      "Blank Input Return Length": 0,
      "Execution Profile": "Byte-scanning deletion with optional character modifiers",
      "Concatenation Role": "Removes all whitespace by default"
    },
    {
      "Function Name": "COMPBL",
      "Leading Blanks Removed": "No",
      "Trailing Blanks Removed": "No",
      "Inter-Word Blanks Removed": "Collapsed to single space",
      "Blank Input Return Length": 1,
      "Execution Profile": "Multi-space buffer normalization",
      "Concatenation Role": "Standardizes variable spacing between words"
    },
    {
      "Function Name": "CATS",
      "Leading Blanks Removed": "Yes",
      "Trailing Blanks Removed": "Yes",
      "Inter-Word Blanks Removed": "Preserved",
      "Blank Input Return Length": 0,
      "Execution Profile": "Integrated multi-argument stripping and concatenation",
      "Concatenation Role": "Strips all arguments and joins them"
    },
    {
      "Function Name": "CATX",
      "Leading Blanks Removed": "Yes",
      "Trailing Blanks Removed": "Yes",
      "Inter-Word Blanks Removed": "Preserved",
      "Blank Input Return Length": 0,
      "Execution Profile": "Delimited multi-argument stripping and concatenation",
      "Concatenation Role": "Strips all arguments and inserts delimiter"
    }
  ],
  "sources": [
    {
      "title": "SAS Institute: STRIP Function",
      "url": "https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/a002295689.htm",
      "accessed": "2026-11-19"
    },
    {
      "title": "SAS Institute: TRIM Function",
      "url": "https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/a000212226.htm",
      "accessed": "2026-11-19"
    },
    {
      "title": "SAS Institute: COMPRESS Function",
      "url": "https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/a000212246.htm",
      "accessed": "2026-11-19"
    },
    {
      "title": "SAS Institute: CATS Function",
      "url": "https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/a002256540.htm",
      "accessed": "2026-11-19"
    },
    {
      "title": "ListenData: STRIP Function in SAS",
      "url": "https://www.listendata.com/2023/07/strip-function-how-to-remove-spaces.html",
      "accessed": "2026-11-19"
    },
    {
      "title": "UCLA OARC Stats FAQ",
      "url": "https://stats.oarc.ucla.edu/sas/faq/how-can-i-get-rid-of-extra-spaces-in-a-string-variable/",
      "accessed": "2026-11-19"
    }
  ]
}