-
May 30th, 2005, 09:38 PM
#1
Thread Starter
Fanatic Member
Placeholder
Is there something like this? Like
string str=string.Format("I am {0}","nebulom"); in C# where "nebulom" is the first argument and placed in the place holder marked {0}. Or....
printf("%s","Hello"); in C... I need help. Thanks.
Last edited by nebulom; May 30th, 2005 at 09:41 PM.
-
May 30th, 2005, 09:41 PM
#2
Thread Starter
Fanatic Member
Re: Placeholder
Oh, my bad. Sorry for posting. Never thought it looks like C.
String s=String.format("I am %s","nebulom");
Anyway, just don't wanna delete this as someone might find it useful.
-
May 31st, 2005, 02:19 AM
#3
Re: Placeholder
String.format is one option, and a rather new one (Java 5). Before that, there was java.text.MessageFormat.
All the buzzt
CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|