Re: [julia-users] Re: How to get first number from Int64
One solution is to make sure you're using the current release version of Julia: parse(Int,string(lista[3])[1]) works as intended. On Wednesday, October 28, 2015 at 3:06:26 AM UTC-7, paul analyst wrote: > > Is ok but I can`t convert to int > julia> string(lista[3])[1] > '4' > > julia> int(string(lista[3])[1]) > 52 > Paul > W dniu 2015-10-27 o 09:35, Alireza Nejati pisze: > > Michele's solution is preferred here, but you can also do it like this: > > > > string(lista[3])[1] > >
Re: [julia-users] Re: How to get first number from Int64
Is ok but I can`t convert to int julia> string(lista[3])[1] '4' julia> int(string(lista[3])[1]) 52 Paul W dniu 2015-10-27 o 09:35, Alireza Nejati pisze: Michele's solution is preferred here, but you can also do it like this: string(lista[3])[1]
[julia-users] Re: How to get first number from Int64
Michele's solution is preferred here, but you can also do it like this: string(lista[3])[1]
[julia-users] Re: How to get first number from Int64
If you do a: precomp = map(log10,2:10) Then a oneliner for the first digit is: searchsortedfirst(precomp, log10(lista[3])%1.0) There are many paths in the garden. But this one is not as long (slow) as it looks. On Tuesday, October 27, 2015 at 10:35:18 AM UTC+2, Alireza Nejati wrote: > > Michele's solution is preferred here, but you can also do it like this: > > string(lista[3])[1] >