Skip to content

TRIM

Trims spaces off the end of a character expression.

Reporting Area(s)

General

Required Parameters

  1. Field to be trimmed (i.e. cocrsenm, nmfirm, rgstatus)

Optional Parameters

  1. Numeric value to determine case sensitivity when using parameter 3. If 0, search is case-sensitive. If 1, search is case-insensitive.
  2. Character string to remove (i.e. "<p>").

Example(s)

TRIM(cocrsenm) returns course name without any trailing spaces

TRIM(cadesc2,1,"<p>") returns cadesc2 with the <p> tag removed from the end of the field.

Notes

Standard FoxPro Function

Also, ALLTRIM(fieldname) trims spaces off of left and right sides, LTRIM(fieldname) trims spaces off of Left side of expression