• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Upper case string in formatter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Upper case string in formatter


  • Subject: Re: Upper case string in formatter
  • From: Larry Fransson <email@hidden>
  • Date: Sun, 5 Dec 2004 03:29:16 -0800


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:
This email sent to email@hidden


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

  • Prev by Date: UDP Code from EDCommon
  • Next by Date: Re: Might be a stupid queston... but
  • Previous by thread: RE: Upper case string in formatter
  • Next by thread: Absolute Value |x - y|
  • Index(es):
    • Date
    • Thread