Re: [Jython-users] Concating string and number..
by patrickchamberlain other posts by this author
Oct 14 2003 8:36AM messages near this date
Re: [Jython-users] Concating string and number..
|
Re: [Jython-users] Concating string and number..
simply calling toString() on the number also works
for example
> >> a = "abc"
> >> n = 2
> >> c = a + n.toString()
> >> print c
abc2
On Tue, 2003-10-14 at 00:49, Jim Adrig wrote:
>
> Of course if you REALLY WANT to use Java, you could; for Integers:
>
> from java.lang import Integer
> c = s + Integer(a).toString()
>
> Although if it might not be an Integer it would be harder.
>
> - Jim
>
> On Monday, October 13, 2003, at 10:40 PM, Vijay Mulimani wrote:
>
> > Hi All,
> > I have just started using Jython and do not have have a very deep
> > knowledge about it. I am facing problem in concatenating a string
> > value with a numeric value.
> > Example- The string is stored in a variable, and there is another
> > variable which has a numeric value, I want to concatenate the string
> > and numeric value.
> > I tried but it's not as same as in Java.
> > Some might find this Q as a very silly and basic !!! But help is
> > appreciated.
> >
> > Thanks in advance.
> >
> > Vijay
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Jython-users mailing list
Jython-users@[...].net
https://lists.sourceforge.net/lists/listinfo/jython-users
Thread:
Vijay Mulimani
Jim Adrig
Jingzhao Ou
patrickchamberlain
patrickchamberlain
|