Shop OBEX P1 Docs P2 Docs Learn Events
Is there a spin function (or object) to concatenate strings ? — Parallax Forums

Is there a spin function (or object) to concatenate strings ?

UntelUntel Posts: 27
edited 2009-02-09 19:34 in Propeller 1
Is there a spin function (or object) to concatenate strings ?

Best regards
N.R.

Post Edited By Moderator (Joshua Donelson (Parallax)) : 10/23/2009 4:51:36 AM GMT

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-02-09 16:55
    Please use the pencil icon to the top right of your message to add a subject. This will helps others to help you. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • Mike GreenMike Green Posts: 23,101
    edited 2009-02-09 17:02
    There's no Spin function to concatenate strings. I believe there was an object posted that provided some basic string operations, but I don't have a link handy. The following will concatenate a string (src) on the end of another (dst). There's no checking for space overflow and the original string (dst) can't be a string constant.

    bytemove(dst+strsize(dst),src,strsize(src)+1)
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-02-09 18:40
    My dynamic strings object includes a concatenation function. It comes with a lot of additional baggage (e.g. a heap manager), though, so it may be overkill for what you're trying to do.

    -Phil
  • UntelUntel Posts: 27
    edited 2009-02-09 19:34
    Thanks everyone for the informations
    This tell me that I will have to deal with byte moving and adjustemnts
    Regards
    N.R.
Sign In or Register to comment.