• 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: @Strings and strings in C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: @Strings and strings in C


  • Subject: Re: @Strings and strings in C
  • From: "M. Uli Kusterer" <email@hidden>
  • Date: Sun, 29 Jun 2003 16:43:12 +0200

At 14:33 Uhr +0200 29.06.2003, Sanri Parov wrote:
I'm dealing with BerkeleyDB for my database application 'cause I find
it very easy to use.
I can't understand very well from Apple docs the difference between how
the strings are handled in ObjC and C.
How can I transform a string to a byte string, in order to let it be
accepted by BerkeleyDB? To say, converting from @"Hello" to "Hello"?

const char* str = [[NSString stringWithString:@"Hello"] cString];

There's also UTF8string, I think, in case you need UTF8 instead of whatever cString gives you (ASCII, probably).
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: @Strings and strings in C
      • From: Chris Hanson <email@hidden>
References: 
 >@Strings and strings in C (From: Sanri Parov <email@hidden>)

  • Prev by Date: Re: C program translation
  • Next by Date: Re: @Strings and strings in C
  • Previous by thread: Re: @Strings and strings in C
  • Next by thread: Re: @Strings and strings in C
  • Index(es):
    • Date
    • Thread