ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> Jython-users
Jython-users
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved