• 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: Using control characters in xcode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using control characters in xcode


  • Subject: Re: Using control characters in xcode
  • From: Alex Raftis <email@hidden>
  • Date: Fri, 28 May 2004 10:12:58 -0500

On May 27, 2004, at 1:46 PM, Robinson, Josh D wrote:

I am currently writing an implementation of ASTM serial communication. The problem is that it relies a great deal on Line Feed characters and Carriage Return Characters. When ever I try to put these into xcode to use in a string comparison I create a new line. Does anyone know how I might be able to get around this?

Are you using the proper escapes? For example '\n' for newline and '\r' for carriage return. You can also use '\x00' or '\000' to pass in hexadecimal or octal values in your strings. Thus, "\n\x0a\012" would produce a string with three newlines. Note that if you try to put control characters directly into your code, you're subject to the string encoding used by the compiler, which will cause things like the carriage returns and line feeds to be interpreted differently on different computers. Escape sequences are always translated literally.


Alex Raftis
---
email@hidden
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


References: 
 >Using control characters in xcode (From: "Robinson, Josh D" <email@hidden>)

  • Prev by Date: Re: Installers ???
  • Next by Date: Re: add jar to class browser
  • Previous by thread: Using control characters in xcode
  • Next by thread: Drag from one project to a new project?
  • Index(es):
    • Date
    • Thread