So i am making an app for electrical engineering and I have a problem that I tried to search Google for but have no idea een where to start looking or what to search for.
I get numbers like 2000, 10000, 120000, 14000000 and so on and was wondering how to detect the amount of zeros and change it to 2K, 10K, 120K, 14M and the like.
Any info on how to do this or a link to somewhere taht shows how to do it would be awesome.
That sounds pretty simple. Which part of the code are you struggling with? Can you show what you have so far?
honestly i have never really done any string manipulation in objective c i havent really even joined two strings together. So basically on this i have nothing done and am not even sure where to start
honestly i have never really done any string manipulation in objective c i havent really even joined two strings together. So basically on this i have nothing done and am not even sure where to start
Well, you'll never get far if you don't start. You should start by thinking about what it means to translate 1000 to 1K, 1000000 to 1M, etc. And then look in the docs for help on how to do the necessary string manipulation, which is a totally separate task.
This bit is probably going to be the easiest part of your app to do.
__________________ Recall It!Tag your notes. Tag your photos. Tag your thoughts. Tag your life.
thanks just what i needed. just have to modify some things like no $ and add Ohms haha and change some of the expressions but i understand how to do this now
Well, you'll never get far if you don't start. You should start by thinking about what it means to translate 1000 to 1K, 1000000 to 1M, etc. And then look in the docs for help on how to do the necessary string manipulation, which is a totally separate task.
This bit is probably going to be the easiest part of your app to do.
I always learn better when i see the code but thank you i spend so much time looking at the stupid apple docs haha.
The real problem was that I didnt really know where to start looking but I have a better understanding now.