SPLIT

Home Forums General discussions SPLIT

This topic contains 3 replies, has 3 voices, and was last updated by  Péter Baksa 3 weeks, 6 days ago.

  • Author
    Posts
  • #4674

    David Seabury
    Participant

    I can not figure out how to split the following
    “#4 Rebar”. I can not split the pound sign form
    the number. Any insights would be helpful.

    Thanks

    David

  • #4675

    David Shorter
    Participant

    here you go
    !!!!!2D script
    !!=======================
    string=“#4 Rebar”
    number=strlen(string)
    text2 0,0,number
    reducedString=STRSUB(string, 2,number-2)
    text2 0,-.5, reducedString
    !!=======================
    number = 9
    reducedString = 4 Rebar

    this is one way but there per others
    Hope this helps
    David

    Attachments:
  • #4677

    David Seabury
    Participant

    David

    Thanks for the reply, I have no idea what you did there
    but I will look the GDL guide and see what I can learn.
    I was trying to use SPLIT and got no where.

    Thanks Again

    David

  • #4679

    Péter Baksa
    Participant

    SPLIT can only process numbers delimited with whitespace.

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE

You must be logged in to reply to this topic.