0 Members and 1 Guest are viewing this topic.
(SETQ string "xxx_x" pattern "_x" newString (IF (SETQ index (VL-STRING-SEARCH pattern string 0)) (VL-STRING-SUBST "" pattern string index) ))
vl-string-right-trim will remove each individual character in the list provided, not the string pattern, meaning it removes each "_" and each "x" it finds, not the pattern "_x"
you could try something like this ..Code: [Select](SETQ string "xxx_x" pattern "_x" newString (IF (SETQ index (VL-STRING-SEARCH pattern string 0)) (VL-STRING-SUBST "" pattern string index) ))