Posted By

barigazy on 07/17/12


Tagged


Versions (?)

Filter sufix number


 / Published in: Maxscript
 

Get only object name number as string

  1. theNumbers = "1234567890"
  2. objname = "Box5312"
  3. fn filterSufix CorN objName =
  4. (
  5. sfx = trimLeft (trimRight objName) ; local cnt = sfx.count
  6. if cnt != 0 do for i = cnt to 1 by -1 do
  7. (
  8. if findString CorN sfx[i] == undefined do (sfx = replace sfx i 1 "")
  9. ) ; sfx
  10. )
  11. filterSufix theNumbers objname

Report this snippet  

You need to login to post a comment.