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

  • SEARCH
  • Home
  • 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 9139257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:21:50+00:00 2026-06-17T09:21:50+00:00

I am receiving a string from server in this format: 0_1_2_3 My task is

  • 0

I am receiving a string from server in this format:

0_1_2_3

My task is to select for digits from this string to fill four labels with them.
First idea was:

NSString *res1 = [result substringWithRange:NSMakeRange(0, 1)];
[firstLabel setText:res1];

four times with appropriate labels.
But operation will repeats many times and every time I will receive a string with increased digit values. So when every digit be a decimal this code will not work. So how can I track every digit independently from their length in a proper way?

  • 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-06-17T09:21:51+00:00Added an answer on June 17, 2026 at 9:21 am

    NSString comes with a convenience method called -componentsSeparatedByString:

    NSString *myString = @"0_1_2_3";
    NSArray *myDigitStrings = [myString componentsSeparatedByString:@"_"];
    
    /* access digit strings from myDigitStrings array by index or fast enumeration... */
    for (NSString *myDigitString in myDigitStrings)
        NSLog(@"digit string: %@", myDigitString);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having some problems receiving a String from a multicast. It's the first time
I am receiving this from the server and I don´t understand what the T
i am receiving response from my server, it looks like this : 2012-09-12 16:29:11.690
I'm receiving a string like this: { key1 = some value; key2 = some
I'm receiving remote notification with string \U00d8\U00aa\U00d8\U00aa\U00d8\U00a7\U00d8\U00a7 I would like to display this string
So I am coding this client/server program. This code is from the client side.
I'm receiving a date from a server in milliseconds since 1-1-1970. I then use
Currently I have this problem. Client downloads from server successfully only the 1st time.
I am currently using this function to send data from the server to the
I am receiving XML from a server whose schema specifies nearly every element as:

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.