realbasic-nug
[Top] [All Lists]

Re: Quickest way to build a string?

To: REALbasic-NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: Quickest way to build a string?
From: Kem Tekinay <ktekinay@mactechnologies.com>
Date: Thu, 29 Jan 2009 18:25:32 -0500
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <498238EF.4010801@cowgar.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
Thread-index: AcmCaOECOTKpx6bHz0iQlrHpbHnlIQ==
Thread-topic: Quickest way to build a string?
User-agent: Microsoft-Entourage/12.15.0.081119
On 1/29/09 6:17 PM, "Jeremy Cowgar" <jeremy@cowgar.com> wrote:

> What is the quickest/best way to build a string? For instance:

 dim arr( -1 ) as string
 arr.Append "John Doe"
 arr.Append " had "
 arr.Append " a "
 arr.Append " dog. "

 dim s as string = join( arr, "" ) // "John Doe had a dog. "

Or, if you know you always want a space between elements:

 dim arr( -1 ) as string
 arr.Append "John Doe"
 arr.Append "had"
 arr.Append "a"
 arr.Append "dog."

 dim s as string = join( arr, " " ) // "John Doe had a dog."

__________________________________________________________________________
Kem Tekinay                                                 (212) 201-1465
MacTechnologies Consulting                              Fax (914) 242-7294
http://www.mactechnologies.com                        Pager (917) 491-5546

  To join the MacTechnologies Consulting mailing list, send an e-mail to:
           mactechnologies_consulting-subscribe@yahoogroups.com









_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>