Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6330567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:53:42+00:00 2026-05-24T17:53:42+00:00

I have an NSURLRequest being made that to a server that returns a string.

  • 0

I have an NSURLRequest being made that to a server that returns a string.

string = [[NSMutableString alloc] initWithData:receivedData encoding:NSUTF8StringEncoding];

receivedData is the mutable array that the downloaded data is stored in. Everything works fine.

I have now, however, added another value to that string. An example of the returned string would be 14587728000000 , 376.99. Originally it was one value so I didn’t have to do any splicing. But, now that I have another value, I want to be able to separate it into two different strings.

What should I do to separate the two values into different string? Some kind of search that goes till the first space, or something like that. I have access to the server, and the string is generated in PHP so the separator can be anything.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T17:53:43+00:00Added an answer on May 24, 2026 at 5:53 pm

    You can do this with the NSString componentsSeparatedByString method:

    NSString *string = @"14587728000000,376.99";
    NSArray *chunks = [string componentsSeparatedByString: @","];
    

    You can find some other common NSString tricks (where I found this one) here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I Have a Class that needs to make an HTTP request to a server
My situation is that I have a POST cgi script that generates and returns
I have a WebView that loads a local HTML file like this: [webView loadRequest:[NSURLRequest
Have you ever seen any of there error messages? -- SQL Server 2000 Could
I have an app that works with tabs and webview. I already have it
I'm a little new to objective-C but have run across a problem that I
Does anyone knows if NSURLConnection/NSURLRequest have support for gzip requests. If does, can you
I have a UIWebView that works fine for viewing an unencrypted Word or Excel
I have a method that asynchronously downloads images. If the images are related to
Heres the problem. I have an app that is essentially an image gallery, it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.