@hanhphuc Depending on the scenario, your version might have a side effect. While (setq str "vessel_name_type") is the given category sample, since you change delimiters for spaces, any string containing a space itself would get split as well. (setq str "Boat_Santa Maria_Destroyer") would return ("BOAT" "SANTA" "MARIA" "DESTROYER"). With the read approach it also change the case of the strings too, which might or might not be an issue.
Everyone else went recursive... here'S my iterative version
(defun Jef!:splitstr (delim str / nxt ep ret)
(setq nxt (1+ (strlen delim)))
(while (setq ep (vl-string-search delim str))
(setq ret (cons (substr str 1 ep)ret))
(setq str (substr str (+ nxt (strlen (car ret))) (strlen str)))
)
(reverse(cons str ret))
)
Cheers!