Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 121 results for
nsstring
- Page 1
Re: Read csv file into NSString
Programming
Software Development
10 Years Ago
by hericles
[
NSString
stringWithContentsOfFile: encoding: error] will read your csv file. Once you have your file into a
NSString
you can use componentsSeparatedByString: to split it as you need. For example, to split it into an array based on line feeds: `NSArray *lines = [csvString componentsSeparatedByString:@"\r\n"];` Hope that helps.
NSString initWithFormat - memory mgmt
Programming
Software Development
11 Years Ago
by badboy11
Newbie Question: Does
NSString
's instance method(s) initWith... return an autoreleased object or does receiver take ownership? - (id) initWithFormat: arguments
user input NSString
Programming
Software Development
11 Years Ago
by MareoRaft
… //#import <string.h> @interface Numbers : NSObject {
NSString
*name; int age; NSMutableArray *list; } //-(void) setName;…quot;%s", &n ); // name = [
NSString
stringWithUTF8String:n]; name = [
NSString
stringWithCString: n encoding: NSASCIIStringEncoding]; } ... What could …
Objective Objective C: Find and copy substings from NSString.
Programming
Software Development
12 Years Ago
by hiddepolen
…string in between? My code: [CODE]
NSString
*googleString = @"http://www.mypage.… URLWithString:googleString]; NSError *error;
NSString
*googlePage = [
NSString
stringWithContentsOfURL:googleURL encoding:NSASCIIStringEncoding error:&…
Re: user input NSString
Programming
Software Development
11 Years Ago
by Moschops
… array of char) and how to use them. Secondly, the
NSString
stringWithCString method wants a char pointer, and you're trying…
Read csv file into NSString
Programming
Software Development
10 Years Ago
by VUEKID
Need help reading a csv to
NSString
and then to NSMutableArray. I need to output the name of a certain row base on car. file ex: car, bike, wheels toyota, mountainbike, rims .. .. ..
how to parse json from a file inside folder?
Programming
Software Development
9 Years Ago
by silent lover
…;ArialMT" size:8]; label15.text = [
NSString
stringWithFormat: @" %@", json[@"halaman1&…;ArialMT" size:8]; label50.text = [
NSString
stringWithFormat: @" %@", json[@"halaman1&…
Problem with NSMutableArray & object retrieval from it, populated using NSXMLParser
Programming
Software Development
13 Years Ago
by KunalPatel
… = [elementName copy]; } - (void) parser:(NSXMLParser *)parser didEndElement:(
NSString
*)elementName namespaceURI:(
NSString
*)namespaceURI qualifiedName:(
NSString
*)qName { // if([elementName isEqualToString:@"FirstName"]) self…
Re: NSTableView is not updating correctly
Programming
Software Development
10 Years Ago
by dancks
…0) d="0"; return [[
NSString
alloc] initWithUTF8String:d]; } /*-(
NSString
*)converttonsstring:(int)a { int size=1…/=10) { *b-- = (char)((c%10)+48); } return [[
NSString
alloc] initWithUTF8String:b]; }*/ -(void)awakeFromNib { NSIndexSet *indices = [NSIndexSet…
iPhone - properties of a list of files
Programming
Mobile Development
13 Years Ago
by akilank
…directoryContent = [[NSMutableArray alloc] init]; for (
NSString
*path in paths){
NSString
*documentsDirectory = [[path lastPathComponent] stringByDeletingPathExtension]; [… = [attrDir objectForKey:NSFileSize]; filesName = (
NSString
*)directoryContent; filesType = [path pathExtension]; createdDate…
Objective-C noob: EXC_BAD_ACCESS with simple print method?
Programming
Software Development
10 Years Ago
by dancks
…return self; } -(void)dealloc { [self destroy]; } +(que *)get_new:(
NSString
*)str { que *nnew = 0; if(!(nnew = malloc(sizeof(que)))) …top!=0) { [linkedlist pop:&top]; } } -(
NSString
*)stringAt:(int)i {
NSString
*b = @""; if(i<count) {…
Grabbing video path for each video in iOS device's Camera Roll
Programming
Mobile Development
5 Years Ago
by nocoded
… == PHAssetMediaTypeImage) { [[PHImageManager defaultManager] requestImageDataForAsset:asset options:nil resultHandler:^(NSData *imageData,
NSString
*dataUTI, UIImageOrientation orientation, NSDictionary *info) { NSURL *url = [info objectForKey:@"…
Learning/Tutorial/Problem Set
Programming
Software Development
11 Years Ago
by MareoRaft
… an integer", num); //@"string" is a constant
NSString
object //"string" is a constant C-style string… %.2f", var, var, var, var);
NSString
* formattedNumber = [
NSString
stringWithFormat:@"%.02f", var]; NSLog(formattedNumber);
NSString
* stringy = @"we use a string…
Question: What are Properties and how to use Them and When to use them ?
Programming
Software Development
11 Years Ago
by Harvey_10
…example. for example: @interface coffeeShop: NSObject {
NSString
*coffee;
NSString
*icedCoffee; } // In my opinion, i believe… them. @proiperty (strong, nonatomic)
NSString
*coffee; @property (strong, nonatomic)
NSString
*icedCoffee; @end @implementation coffeeShop //…
NSTableView is not updating correctly
Programming
Software Development
10 Years Ago
by dancks
…IBAction)setAt:(id)sender; -(int)converttonum:(const char *)a; -(
NSString
*)converttonsstring:(int)a; @end .m: #import "…10) { b[--size] = (char)((c%10)+48); } return [[
NSString
alloc] initWithUTF8String:d]; } -(void)awakeFromNib { NSIndexSet *indices = [NSIndexSet…
Working with Class, properties and Initialization
Programming
Software Development
9 Years Ago
by harde_1
…#import "ClassA.h" @implementation ClassA // part 6d -(
NSString
*)description { return [
NSString
stringWithFormat:@"a1 = %@, a2 = %@ a3 = %@",…NSLog (@"%@", self.description); -(id) initWithA1:(int)x andA2:(
NSString
*)s andA3:(int)y { self = [super init]; if (self…
How do I search and display results from a plist file?
Programming
Mobile Development
9 Years Ago
by Shane-dev
… *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static
NSString
*cellID = @"cellID"; UITableViewCell *cell =… #pragma Search Methods - (void)filterContentForSearchText:(
NSString
*)searchText scope:(
NSString
*)scope { NSPredicate *predicate = [NSPredicate …
Help with simple program
Programming
Software Development
12 Years Ago
by Navlag
… INT back to a String
NSString
*FinalPayment = [
NSString
stringWithFormat:@"%d", AlmostDone]; //Print to Screen
NSString
*paymentScreen = [[
NSString
alloc] initWithFormat:@"In order…
Re: Question: What are Properties and how to use Them and When to use them ?
Programming
Software Development
10 Years Ago
by geojia
…define a property ie: `@property (nonatomic, strong)
NSString
*coffee;` xCode actually creates couple of things:…2. a getter for the instance variable - (
NSString
*)coffee{ return _coffee } 3. a setter for… the instance variable - (void)setCoffee:(
NSString
*)coffee{ _coffee = coffee } Also in the current…
Cant Connect to MySQL server?
Programming
Software Development
10 Years Ago
by Malymieczek
…)backgroundTouched:(id)sender { [nameText resignFirstResponder]; [userID resignFirstResponder]; } -(void) postMessage: (
NSString
*) user withName: (
NSString
*) name{ if(name != nil && user != nil) { NSMutableString…
COCOS2D help needed
Programming
Game Development
9 Years Ago
by Dave_5
…runAction:[CCSequence actionWithArray:actionList]]; } - (void) addCollideLayer:(
NSString
*)name { CCTMXLayer *layer = [tileMap layerNamed:name]; … addObject:layer]; } } - (void) removeCollideLayer:(
NSString
*)name { [collideLayers removeObject:[tileMap layerNamed:name]]; }…
Re: Working with Class, properties and Initialization
Programming
Software Development
9 Years Ago
by geojia
Part c is asking you to make an initializer with the calss. ie. [
NSString
string] (which is equivalent to [[
NSString
alloc]init]autorelease]). It's testing your ability to create class functions.
Objective C launching NSTask to run a shell script and get output
Programming
Software Development
14 Years Ago
by bjohnst8
…:[[NSBundle mainBundle] resourcePath]]; NSLog(@"%@", Array);
NSString
* scriptPath = [[NSBundle mainBundle] pathForResource:@"hello"… launch]; NSData *data; data = [file readDataToEndOfFile];
NSString
*string; string = [[
NSString
alloc] initWithData: data encoding: NSUTF8StringEncoding]; NSLog (@"got…
Error with Game code
Programming
Software Development
10 Years Ago
by mat0pad
… "Transition.h" @interface Design_190_190_Clicktoplaylevel : ActorScript { @public
NSString
* tempHolder; Scene* _Scenetoplay;
NSString
* _Levellabel; float _levelnumber; } @end @implementation Design_190_190_Clicktoplaylevel -(void)load…
How Do I make This function work
Programming
Software Development
10 Years Ago
by AndyGuy
…. Here is my code. -(NSInteger) RetrieveAscCode:(
NSString
*) inchr{
NSString
*chtable =@"0123456789.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; NSInteger scan;
NSString
*trim; trim = [inchr substringToIndex:1]; for…
how could i do to enable scrolling and see all the rows in UITableview?
Programming
Software Development
9 Years Ago
by surferbloggy
…tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { /////////////////////// static
NSString
*simpleTableIdentifier = @"SimpleTableCell"; ZRK_RSSItem *item =…quot;MMM d, YY"];
NSString
*lastUpdated = [
NSString
stringWithFormat:@" %@",[formatter …
Actually Swift: Keep getting EXC_BAD_INSTRUCTION
Programming
Software Development
9 Years Ago
by pars99
… } func circle(){ var radius = (length.stringValue as
NSString
).floatValue var circumfrence = 2.0 * 3.14 *… var rectLength = (length.stringValue as
NSString
).floatValue var rectWidth = (width.stringValue as
NSString
).floatValue var perimeter = (2.0 …
how to check the getter and setter?
Programming
Software Development
9 Years Ago
by sing1006
…myText; @synthesize opacity; @synthesize delegate; //getter -(
NSString
*)myText{ return myText; } -(NSNumber*)opacity{ return…delegate{ return delegate; } //setter -(void)setMyText:(
NSString
*)_myText{ if(myText!=_myText){ [myText release];…
java and objective-c communication help
Programming
Software Development
14 Years Ago
by Talguy
…]; } - (IBAction)buttonPressed:(id)sender { [socket sendString:@"hi"];
NSString
*received = [socket readString]; if(received == nil) { NSLog(@"nothing …received"); } else { Hello.text = received; } } - (void)sendString:(
NSString
*)string { const char* s = [string UTF8String]; int len = strlen(s…
What means CG prefix in ObjC
Programming
Mobile Development
12 Years Ago
by fibbo
… can connect it with something. So there is CGFloat, NSInt,
NSString
and all that stuff and I'm wondering what these… from the C data type. Example String (the C-String),
NSString
(the ObjC string). So question remains: what means CG and…
1
2
3
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC