Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String which holds a number 1

Status
Not open for further replies.

ddrillich

Technical User
Jun 11, 2003
546
US
Good Day,

How do I find out if a certain string represents a number?

Regards,
Dan
 
Great!

In the code, should I say -

if (theString.isdigit() == "True"):

I'm not sure about the syntax...
 
if (SPNcandidate.isdigit() == 1): worked
 
Hi

No, should be without the quotes ( " ) :
Code:
if (theString.isdigit() == True):
But while [tt]isdigit()[/tt] returns boolean, why to compare it with another boolean to get a boolean ?
Code:
if (theString.isdigit()):

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top