Share
 
 

vl-string-trim (AutoLISP)

Removes the specified characters from the beginning and end of a string

Supported Platforms: Windows, Mac OS, and Web

Signature

(vl-string-trim char-set str)
char-set

Type: String

Characters to be removed.

str

Type: String

The textual value to be trimmed of char-set.

Return Values

Type: String

The value of str, after any characters have been trimmed.

Release Information

    Releases:

  • AutoCAD R14 and later on Windows
  • AutoCAD 2011 and later on Mac OS

Examples

(vl-string-trim " \t\n" " \t\n STR \n\t ")
"STR"

(vl-string-trim "this is junk" "this is junk Don't call this junk! this is junk")
"Don't call this junk!"

(vl-string-trim " " "      Leave me alone   ")
"Leave me alone"

Was this information helpful?