[Coldstuff] Removing newline in string

Adam Cormany coldstuff@cold.org
Tue, 30 Jul 2002 07:39:09 -0700 (PDT)


Sorry, when I wrote my prior email, I wasn't thinking
yet in the morning. Didn't have my morning dose of
caffeine yet:) I figured out what I was trying to do.
Sorry for the mumbling.
 

--- michael@mudge.com wrote:
> I don't understand this question very well.  The
> following code will in fact
> return "abc":
> 
> var x;
> x="a";x+="b";x+="c";
> return x;
> 
> The question is, is this what you're really trying
> to do, or are you trying to
> send unterminated lines to a connection?
> 
> Your question asked if there is a way to remove a
> newline from a string, so
> the answer to that is: ColdC strings can't contain
> newlines (buffers can), but
> you could put a "\n" in a string.  str_to_buf()
> automatically converts that
> sequence into a line terminator (CRLF)
> (strings_to_buf() does not), although,
> you don't really need to deal with this sort of
> thing unless you're writing
> deep core stuff like the login screen.
> 
> If this is what you're trying to do, the output
> routines (.tell for ColdCore,
> I think) is tacking a `[13,10] at the end of the
> string, after the string's
> been converted to a buffer.
> 
> - Kipp
> 
> On Mon, 29 July 2002, Adam Cormany wrote:
> 
> > 
> > Is there a way to remove a newline(\n) in a
> string? I
> > want a string that is nonterminating. For example:
> > 
> > I want to do x="a";x+="b";x+="c" and have a return
> of
> > x="abc". Is there an easy way to do this with
> strfmt
> > or some other function?
> > 
> > Thanks,
> > Adam
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Health - Feel better, live better
> > <a
>
href="http://mail.mudge.com//jump/http://health.yahoo.com">http://health.yahoo.com</a>
> > _______________________________________________
> > Cold-Coldstuff mailing list
> > Cold-Coldstuff@cold.org
> > <a
>
href="http://mail.mudge.com//jump/http://web.cold.org/mailman/listinfo/cold-coldstuff">http://web.cold.org/mailman/listinfo/cold-coldstuff</a>
> _______________________________________________
> Cold-Coldstuff mailing list
> Cold-Coldstuff@cold.org
> http://web.cold.org/mailman/listinfo/cold-coldstuff


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com