[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: combining string values
From: |
Ben Pfaff |
Subject: |
Re: combining string values |
Date: |
Sun, 04 Jan 2009 13:10:16 -0800 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
Jason Stover <address@hidden> writes:
> I need to combine multiple string values into a single
> string, in a one-to-one way. For example, in the following
> data set, there are two variables, each with two values:
>
> var1 var2
> ae f
> a ef
>
> I don't want to just concatenate the values because
> I would have aef in both cases.
If you strip the whitespace at the end of each string, this is
true. If you retain the whitespace, then you have "aef " and "a
ef", which are of course different.
> I can work around this by using strtol, or something
> like it.
I don't see how strtol is relevant?
> Two questions:
>
> 1. Is there some other function I should use?
Other than...?
> 2. Will this approach cause problems in the future if the union value
> contains a long string?
I'll fix up any problems with union value before I offer up the
related changes. I'm working on that now (I've had a few hours a
day to work on this, for the last few days).
--
Ben Pfaff
http://benpfaff.org