Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Draw This
($0.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-24-2008, 05:41 PM   #1 (permalink)
Saurman
Registered Member
 
Join Date: Jul 2008
Posts: 97
Saurman is on a distinguished road
Default Double to string

Quick problem,

i need to have following conversion (double to string):
  • 123.0 -> '123'
  • 123.123 -> '123.123'
  • 123.00001 -> '123.00001'

i tried stringWithFormat but i cant find a way to show fractal part without trailing zeros, with a precision of current double value. In other words, if there is frac, show them all, no trailing zeros. If no frac - show only part before float separator.

I need to populate double value into UITextView or how it is called (aka TEdit)
Saurman is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,020
Threads: 93,864
Posts: 401,922
Top Poster: BrianSlick (7,962)
Welcome to our newest member, wendolynlm80
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:26 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.