cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Convert String to Number

Kullay
New Contributor III

Hi All,

how to convert String to Number,
Like :String str=โ€œ12SSโ€;
Number = 12SS
please help me on this Issue.

Thanks,
kullayappa

4 REPLIES 4

cjhoward18
Employee
Employee

Hi Kullay

I was able to use parseFloat(โ€œ22SSโ€) and parseInt(โ€œ22SSโ€) and result in the number 22.

However, the SS is not a numeric value so it is not included. Is SS intended to be part of your number?

If so, Iโ€™m not sure there is a way to have a number type that contains letters like โ€˜SSโ€™

Kullay
New Contributor III

@cjhoward18 , Its working Thank you for update

Anil
New Contributor III

Hi @Kullay

Could you please describe about your use case?

Thanks,
Anil

Kullay
New Contributor III

Hi Anil,

I got the Issue, we need to use the Parseint() or Parseflot().

Thanks,
kullayappa