Re: Cutting strings from right to left
Re: Cutting strings from right to left
- Subject: Re: Cutting strings from right to left
- From: "a.d. jensen" <email@hidden>
- Date: Fri, 9 Dec 2005 13:32:07 -0600
Hows about:
if (strlen(strVal)) > 4)
strVal[strlen(strVal) - 4] = 0;
(assumes c string -- Pascal string: strVal[0] = strVal[0] - 4;)
All that assumes that you truly always want to cut four digits off of
the end :-)
dale
--
email@hidden
http://adjensen.aatrix.com
Only a fool turns away from an angel,
Vision in white steps through the door,
Holds out her hand, I say 'No I'm not ready'
I open my eyes and let the dream fade away.
-- echolyn, "on any given nite"
On Dec 9, 2005, at 1:17 PM, Sanri Parov wrote:
Hi everybody,
I've got the goal to transform these strings
-8.230000
120.000000
into
-8.23
120.00
by mean of cutting 4 decimal zeroes.
Is there a way to do this easily ?
Many thanks !!
--
Sanri Parov from iBook
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden