🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #7233

Re: string substitution in java

#7233
From: CLG
Date: Wed, 04 Jul 2001 14:06
43 lines
1905 bytes
+ does not concatenate unless of course, the value is unknown at compile
time.
in that case, using StringBuffer will be faster.



--
Peace,


Carl L. Gilbert
http://www.rigidsoftware.com
ICQ 614395-currently stolen working to retrieve.

"Then said I, Wisdom [is] better than strength: nevertheless the poor man's
wisdom [is] despised, and his words are not heard." Ecclesiastes 9:16

"WANG" <wangjian@online.sh.cn> wrote in message news:3b431d00_2@dnews...
> first question:
> Is there any way to substitute the string in java as like in c/c++ with
> sprintf or in delphi with Format(s,OPENARRAY(TVarRec,..)). It's very
usefull
> to build the SQL statement in run time.
>
> second question:
> With assignment of a long string I have to break it into several pieces
and
> use + to concatenate them
> String s="select * from emp"+
>          "where .....";
> Is there a way not to use + concatenation as like in delphi/CB
> AnSistring s="select * from emp \
>               where .......";
>
>
>
>
>
>
>
>
>
>
Technical Details
Message-ID: <3b4323f7$1_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!128.230.129.106!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews
References: <3b431d00_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,ba6e4791af4b2918
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-07-04 07:17:11 PST
From: "CLG" <lamont_gilbert @ rigidsoftware.com>
Newsgroups: borland.public.jbuilder.java.language
References: <3b431d00_2@dnews>
Subject: Re:  string substitution in java
Date: Wed, 4 Jul 2001 10:06:28 -0400
Lines: 45
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-Mimeole: Produced By Microsoft MimeOLE V5.50.4522.1200
NNTP-Posting-Host: 24.181.226.14
Message-ID: <3b4323f7$1_2@dnews>
X-Trace: dnews 994255863 24.181.226.14 (4 Jul 2001 07:11:03 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!128.230.129.106!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews