Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Upper case string in formatter




On Dec 5, 2004, at 01:00, Peter Karlsson wrote:

If I type this in my textfield:

F006400246F7

Is there a easy way to change it on the fly to:

$F0, $06, $40, $02, $46, $F7

I know that I must check content of newString every keypress and add $ ,
and space at the right places, but how?

I am seeing a loop that involves calling -substringWithRange: to decompose the string into an array of two-character strings. Then use -stringWithFormat: to format each two-character string. Then concatenate them.


Larry Fransson
Seattle, WA

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >RE: Upper case string in formatter (From: "Peter Karlsson" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.