Finding the number of digits of an integer

前端 未结 17 2072
难免孤独
难免孤独 2020-12-07 16:32

What is the best method to find the number of digits of a positive integer?

I have found this 3 basic methods:

  • conversion to string

             
    
    
            
17条回答
提交回复
热议问题