Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/17/2018 in all areas

  1. No worries .. I'm sure your Portuguese is better than mine.
    1 point
  2. I sort of understand 2. but could do with a slightly better explanation of the highlighted red items.
    1 point
  3. You could make filters to assign a color according to the family type name for control at the view level.
    1 point
  4. @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!
    1 point
  5. IMO, the OP's time would be better spent trying to learn how to write code for himself :).
    1 point
  6. I think the penny dropped about half an hour after I replied. Lisp is partly written (1 & first part of 2) , tested and working.
    0 points
×
×
  • Create New...